This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# GemInABox | |
# Maintainer: David Hooey | |
### BEGIN INIT INFO | |
# Provides: geminabox | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Gem in a Box |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set timing on; | |
set linesize 120; | |
-- | |
-- Bind Variable Setup | |
-- | |
variable Bind1 number; | |
variable Bind2 varchar2(2000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Shared Pool | |
select * | |
from | |
( | |
select | |
case when executions = 0 then 0 | |
else round(elapsed_time/executions, 3) | |
end "ElapsedPerExec(ms)", | |
elapsed_time "ElapsedTime (ms)", | |
executions "Executions", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select dbms_sqltune_util0.sqltext_to_sqlid('SQL_TEXT_HERE'||chr(0)) sql_id from dual; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table million; | |
drop sequence million_sequence; | |
create table million | |
( | |
id number, | |
type varchar2(50), | |
constraint million_id_pk primary key (id) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table skewed; | |
drop sequence skewed_sequence; | |
create table skewed | |
( | |
id number, | |
type varchar2(50), | |
constraint skewed_id_pk primary key (id) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Shared Pool | |
select | |
event, | |
time_waited "time_waited(s)", | |
case when time_waited = 0 then | |
0 | |
else | |
round(time_waited*100 / sum(time_waited) Over(), 2) | |
end "percentage" | |
from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
name, | |
round(time_secs, 2) time_secs, | |
case when time_secs = 0 then | |
0 | |
else | |
round(time_secs*100 / sum(time_secs) Over(), 2) | |
end pct | |
from | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Shared Pool | |
select * from table(dbms_xplan.display_cursor('SQL_ID',null,'ALL')); | |
-- AWR | |
select * from table(dbms_xplan.display_awr('SQL_ID',null,null,'ALL')); | |
select * from table(dbms_xplan.display_awr('SQL_ID',null,DBID,'ALL')); |
OlderNewer