Skip to content

Instantly share code, notes, and snippets.

<Location />
### COMPRESS EVERYTHING EXCEPT IMAGES >> ###
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
@sheeplogh
sheeplogh / gist:8cc3dcf285c64c462bb5
Last active August 29, 2015 14:21
[Oracle] Monitoring Parallel Execution Performance
-- Monitoring parallel execution
-- http://www.oracle.com/technetwork/jp/database/enterprise-edition/db11gr2-12-130999-ja.pdf
select status, queuing_time, sql_id, SQL_EXEC_START, SQL_EXEC_ID from gv$sql_monitor where sql_text is not null order by SQL_EXEC_START;
select * from gv$sql_monitor
where STATUS = 'EXECUTING' order by SQL_EXEC_START;
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
## Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
# 3. Downloads the following from Oracle Website with one shell invocation.
# a. Windows 64 and 32 bit;
@sheeplogh
sheeplogh / swapsize_per_proc_2.pl
Created May 26, 2016 08:40
Linuxでプロセス毎のswapsizeを表示する( http://www.maepachi.com/blog/entry/130 を元に小改造させていただきました)
#!/bin/env perl
# pachi
#
# This script find out process currently swapped by /proc/$PID/status
use strict;
use warnings;
# When you want to debug, you should exec "export SCRIPT_DEBUG=1".
my $debug = $ENV{SCRIPT_DEBUG} ? 1 : 0;
@sheeplogh
sheeplogh / long_delete-update-merge_query_with_qc_info.sql
Created November 7, 2017 07:54
[long_delete-update-merge_query_with_qc_info.sql] Display DELETE / UPDATE / MERGE running for more than 30 minutes (with SID / serial of parallel coordinator process) #Oracle
select sql_exec_start,username,machine,module,program,
(select px.QCSID||','||px.QCSERIAL# ||',@'||px.QCINST_ID from gv$px_session px where px.sid=vs.sid and px.serial#=vs.serial#) as QC_info,
(select substr(sql_text,1,80) from gv$sql vsql where vsql.sql_id = vs.sql_id and rownum = 1) as SQLTEXT
from v$session vs
where
vs.sql_exec_start < SYSDATE - 1 / 48
and
EXISTS (
SELECT
1