tuning & diagnostics features in oracle sql developer

28
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | All of the Performance Tunng Features In Oracle SQL Developer Jeff Smith [email protected] || @thatjeffsmith Senior Principal Product Manager Database Development Tools Group Oracle Confidential – Internal/Restricted/Highly Restricted

Upload: jeff-smith

Post on 14-Jul-2015

2.286 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

All of the Performance Tunng Features In Oracle SQL Developer

Jeff [email protected] || @thatjeffsmithSenior Principal Product ManagerDatabase Development Tools Group

Oracle Confidential – Internal/Restricted/Highly Restricted

Page 2: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

FREE Oracle Database IDE/GUI

Windows, OS X, *NIX

More than 4,500,000 users worldwide

My Oracle Support available via your DB license

Page 3: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle SQL Developer, Major Feature Areas

PL/SQL IDE

SQL editor

GUI for browsing and managing database objects

Ad Hoc reporting

Database Design & Data Modeling

Database Administration

3rd Party RDBMS Migrations to Oracle

Deploy and Administer Oracle REST Data Services

REST Enablement of the Database

Command Line Interface

Page 4: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle SQL DeveloperRelease History

Project Raptor Early Adopter on OTN

2005

SQLDev 1.1 File Based PL/SQL editing

Reports

Ships with 11gR1

SQLDev 1.5.x Localizations -

Japanese, Spanish,

Italian, German, French,

Portuguese, Chinese, &

Koreans

Ships with 11gR2

SQLDev 1.0 SQL Worksheet

Procedure Editor

The world takes notice!

SQLDev 1.5 Schema Copy/Diff/Export

Thick connections

Versioning

TimesTen

SQLDev 2.1Unit Testing

Data Modeler Viewer

Unshared SQL Worksheets

2007 201020092006

SQLDev 3.0 Full Data Modeler

View > DBA

SQL Tuning Advisor

Query Builder

2008 2011 2012

SQLDev 3.1New Database DIFF

PDF Reports

RMAN

Data Pump

2013

SQLDev 3.2 APEX Listener / ORDS

Support

Database 12c Support

Schema Service Support

SQLDev 4.0 Java 7

ASH/AWR/ADDM

Color Coded Connections

Command line Interface

SQLDev 4.0.3Optimized Code Insight

Oracle Big Data Appliance

2014 2015 2016

SQLDev 4.1 ORDS Included/Full GUI

instance Viewer

SQLcl

Copy PDB to DBaaS

Larry live demos PDB relocate @ OOW

SQLDev v4.2 Real Time SQL Monitoring

TOP SQL Report

Formatter & Other Editor Enhancements

SQLDev WEB

17

SQLclNew CLI

Modern SQL*Plus

Page 5: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

SQL Developer Data ModelerIncluded for free, also available as a separate download/programGood application performance STARTS with a good data model!

Strategy and Analysis

Relational

Database Design

Data Type

Star Schema Physical

Multidimensional

ERD DFD

Logical

Reporting

Import Models

Domains

Page 6: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Queries and Plans

Have a bad query…

see the plan

compare plans

run it, get perf stats

get tuning help

Page 7: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

1. Nodes where cardinality estimation is wrong as witnessed by collected runtime statistics. The node with maximum discrepancy is formally a hotspot. One course of action for performance analyst to follow is adjusting cardinality estimation (e.g. with a hint), thus influencing the optimizer to choose a different plan. 2. Nodes where the execution have spent bulk of the time. Formally, we take cumulative run time of a node (v$sql_plan_statistics.last_elapsed_time) and subtract cumulative run time of it's children.

Autotrace HotSpots (new for 4.1)

Page 8: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Autotrace HotSpots (new for 4.1)

Page 9: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Get Predicates (and notes) in Your Plans

Page 10: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

GET:

Predicates

Other XML

Last Output Rows

(4.1)

Page 11: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

V$SQL_PLAN – click dropdown to get cached plans

Page 12: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Compares – pin plan, get new plan, COMPARE

Page 13: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

SQL Tuning Advisor Tasks

Licensing:

Warnings – you will

know when you are

going to use a Tuning

or Diagnostic Pack

Feature

Control Availability

for each database

connection in the

preferences

Page 14: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Real Time SQL Monitoring (v4.1 and older)

Web View:

EZ to get too

Save report as

web file

EM Flash

presentation

Share with your

devs?

Page 15: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Monitor Sessions Report

Tools Monitor

Sessions:

Run Stock OR

Copy to custom

report

Add Actions

Color the data

Page 16: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Monitor Sessions Report

Page 17: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle SQL DeveloperRelease History

Project Raptor Early Adopter on OTN

2005

SQLDev 1.1 File Based PL/SQL editing

Reports

Ships with 11gR1

SQLDev 1.5.x Localizations -

Japanese, Spanish,

Italian, German, French,

Portuguese, Chinese, &

Koreans

Ships with 11gR2

SQLDev 1.0 SQL Worksheet

Procedure Editor

The world takes notice!

SQLDev 1.5 Schema Copy/Diff/Export

Thick connections

Versioning

TimesTen

SQLDev 2.1Unit Testing

Data Modeler Viewer

Unshared SQL Worksheets

2007 201020092006

SQLDev 3.0 Full Data Modeler

View > DBA

SQL Tuning Advisor

Query Builder

2008 2011 2012

SQLDev 3.1

DBA PANEL

IS BORN!!!

2013

SQLDev 3.2 APEX Listener / ORDS

Support

Database 12c Support

Schema Service Support

SQLDev 4.0 Java 7

ASH/AWR/ADDM

Color Coded Connections

Command line Interface

SQLDev 4.0.3Optimized Code Insight

Oracle Big Data Appliance

2014 2015 2016

SQLDev 4.1 ORDS Included/Full GUI

instance Viewer

SQLcl

Copy PDB to DBaaS

Larry live demos PDB relocate @ OOW

SQLDev v4.2 Real Time SQL Monitoring

TOP SQL Report

Formatter & Other Editor Enhancements

SQLDev WEB

17

SQLclNew CLI

Modern SQL*Plus

Page 18: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

DBA Panel Pages

ASH/AWR

Snapshots

Baselines

Instance Viewer

Page 19: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

• Accessed from the View menu

• Add Existing Connections

• Intended for HIGHLY privileged users

The DBA Panel, available as of v3.1DBA Panel Pages

Page 20: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

ASH/AWR – New for Version 4.0

Page 21: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Manage snapshots, baselines, generate reports & compares

Page 22: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Instance Viewer – real time performance report

Doesn’t Require:

agents

DB objects to install

expensive views

alerts

history

$$$

Page 23: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

How does SQLDev get the Perf Data?

See ALL the SQL

View > Log

Statements Panel

Elapsed time & Bind

parameter values

Page 24: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Wait Events Drill Down report does require Diagnostic Pack…data from gv$active_session_history ash, gv$sqlarea sa

Want to see more details? Double Click for a report

Page 25: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Updates for Version 4.2

Currently Available As an Early Adopter

Updated Real Time SQL Monitoring

Top SQL for Instance Viewer

More flexible SQL Plans

Suggest Optimizer Hints

Page 26: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Real Time SQL Monitoring

Click pic for link to Animated Demo

Page 27: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Plans, Explain, Cached, & AutoTrace

Add Any Plan Column Suggest Hints

Page 28: Tuning & Diagnostics Features in Oracle SQL Developer

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

TopSQL Report

Click pic for link to Animated Demo