SQL Tuning with SQLd360 - DOAG Deutsche ORACLE ... · What’s SQLd360? • Free tool – open...

Post on 08-Mar-2020

3 views 0 download

Transcript of SQL Tuning with SQLd360 - DOAG Deutsche ORACLE ... · What’s SQLd360? • Free tool – open...

SQL Tuning with SQLd360

Mauro Pagano

What’s SQLd360?• Free tool– open source, no strings attached, ever

• No installation• Collect all info needed for SQL Tuning– Consistently, in a single shot– After the fact, no need to re-run stuff

2

What’s SQLd360?• Help digest collected info– Easy to navigate, high focus reports– Charts to consume large amount of data

• Offline analysis– No need to be connect to target database

3

Why another tool?• Community driven, based on user needs– Easy to add reports / features yourself

• Fast in adapting to new Oracle features• Leverage already paid-for Oracle options– Diagnostic pack is awesome in collection, not

that much in presentation

4

How to run it• Download SQLd360• Readme.txt J• SQL*Plus as any user with access to DD• Parameters– SQL ID – Oracle Tuning or Diagnostics Pack? [T | D | N]– Custom configuration file (optional)

5

How to consume output?• Open zip file• Thousands of files in the archive– Index.html drives navigation– Specific “drill-down” pages– Each report has narrow focus

6

7

00001_sqld360_dbnamehash_sqlid_index.html

8

ReportData

Source

DESC of source table

QueryCopy&Paste

9

One chart per histogram created automatically Cardinality, selectivity and

endpoint conversion available with mouse-over

Data distribution on histogram

10

Average elapsed time/exec over time per PHV

Executions started to take longer and longer over time, even original plan degraded.

Likely not a plan issue

Elapsed time per exec

11

Exec plan reported as a treeJust read it left to right

Nodes are colored depending on time sampled

on them. Easy to spot bottlenecks

CBO used this plan, it seemed slow

Tree available also for individual executions, easy to diagnose random slowness

12

Up to 70% on Cluster, plan might be secondary issue,

investigate app first

SQL runs slow, must be plan issue

13

Plan switched from 2210 (good) to 2898 (bad), also

plan 711 exists

Performance broke, not sure why

Summary• SQLd360 takes few minutes to run– Can be executed any time even during the issue

• SQLd360 speeds up SQL Tuning process– Automating collection and improving presentation– Simplifying documentation

• Installs nothing and it is free!• Contribute to make it bettter

14

Contact Information• http://mauro-pagano.com– Email• mauro.pagano@gmail.com• sqldb360@gmail.com

– Download• SQLdb360 vYY.NN

– Pages• SQLd360 / SQLdb360

15