Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

11g nf sql_anlz

492 views

Published on

Oracle11g SQL

Published in: Technology
  • Be the first to comment

  • Be the first to like this

11g nf sql_anlz

  1. 1.
  2. 2. SQL Performance Analyzer<br /> forecast the impact of a potential change on the performance of a SQL query workload.<br />WHEN?<br />• Database upgrades<br />• Implementation of tuning recommendations<br />• Schema changes<br />• Statistics gathering<br />• Database parameter changes<br />• OS/hardware changes<br /> might be<br /> reported for as a Tuning Result<br />
  3. 3. SQL Performance Analyzer<br />Extract STS(SQL Tuning Set) from production<br />What’s inside?<br />FROM Cursor Cache<br />– SQL Text<br />– Bind variables<br />– Execution plans<br />– Execution statistics<br />- Incremental capture<br /> over a time period<br />- filtering and ranking capabilities<br /> filters out undesirable SQL<br />FILTERING<br />Always all? No!<br />
  4. 4. SQL Performance Analyzer<br />Transport to a test system (STS COPY)<br />변 경 전<br />변 경 후<br />Execute<br />Re-Execute<br />• Test-Execute SQL<br />– produce execution plans and statistics<br />– execute SQL serially<br />– every SQL is executed only once<br />• Explain plan SQL in SQL tuning set to generate SQL plans only<br />SQL Performance = execution plans + execution statistics<br />
  5. 5. SQL Performance Analyzer<br />And next<br />Detect<br /> - improvements<br /> - regressions<br /> - unchanged performance<br /> - changes in execution plans<br />Tune<br /> - regressed SQLs<br /> - index<br />Choose<br /> - SQL Plan Management baseline<br />X<br />O<br />?<br />SQL Performance = execution plans + execution statistics<br />
  6. 6. SQL Performance Analyzer<br />Do<br />Creating a SQL Tuning Set (Capturing the SQL Workload) Sources<br /> - Cursor Cache<br /> - AWR Snapshots, Baselines<br /> - User-defined Workload (sql_text, parsing_schema_name columns)<br />Exporting the SQL Workload<br /> - choose to export the selected STS<br /> - load a STS on the test system for comparison purposes<br />Collect SQL Performance<br />Change<br /> - parameter<br /> - index<br /> - hint<br />SQL Performance = execution plans + execution statistics<br />
  7. 7. SQL Performance Analyzer<br />Do Do<br />Collect SQL Performance<br />Compare SQL Performance<br />Analysis Results<br /> - before vs after<br />Using EM<br />SQL Performance = execution plans + execution statistics<br />
  8. 8. SQL Performance Analyzer<br />Do DoDo<br />DBMS_SQLTUNE<br /> - CREATE_TUNING_TASK<br /> - EXECUTE_TUNING_TASK<br /> - REPORT_TUNING_TASK<br /> - etc………………<br />To be continued………………<br />SQL Performance = execution plans + execution statistics<br />

×