SQLd360 is a free tool designed to help collecting and analyzing SQL Tuning-related info from an Oracle database.
Available for free on GitHub, just google "sqld360"
14. Meet SQLd360
• FREE!
• No installation
• Can be executed any time
• Single step execution
• Extensive use of visualization
• Leverage existing Oracle features
1/29/17 14
21. Bind peeking, data distrib on histogram
• 1998 SQL Tuning (aka traces)
– Trace each exec and collect histgram info manually
• 2007 SQL tuning (aka SQLT)
– Provides every info necessary
– Straightforward to spot distribution
• But still requires to read a table of up to 2048 rows
1/29/17 21
23. SQL Y breaks SLA since Monday
• 1998 SQL Tuning (aka traces)
– Sorry, can’t help you
• 2007 SQL tuning (aka SQLT)
– Plan stability issue, second plan is takes 909 secs
PLAN_HASH_VALUE EXECS AVG_BUFFER_GETS AVG_ELAPSED_TIME_SECS
3716292209 43 195354839 909.592
4161077702 3 15562769 71.769
1/29/17 23
“But my SLA is
1000secs!!!!”
and PHV 3716… was
used before Monday
28. Old approaches make it hard
• 2007 SQL tuning (aka SQLT)
– You have the data, figure it out
…
SELECT sql_plan_hash_value, count(*), count(distinct sql_exec_id)
FROM dba_hist_active_sess_history
WHERE sql_id = ‘…’
GROUP BY sql_plan_hash_value
…
SELECT sql_exec_id, sql_exec_start, count(*)
FROM dba_hist_active_sess_history
WHERE sql_id = ‘…’
AND sql_plan_hash_value = …
GROUP BY sql_exec_id, sql_exec_start
…
<<another 10 SQL statements>>
1/29/17 28