Category Archives: Uncategorized

Three ways to get a plan with dbms_xplan

Click here to get a zip of the three different scripts I talk about in this post. There are two different functions in the Oracle supplied package DBMS_XPLAN that I use all the time for tuning SQL queries, DBMS_XPLAN.DISPLAY and DBMS_XPLAN.DISPLAY_AWR. … Continue reading

Posted in Uncategorized | 10 Comments

Example of sql performance degrading as data grows

Ran into an example this week using my sqlstat.sql(updated) script to see how a query’s performance changed over time.  Notice that the average disk reads per execution is steadily increasing as is the average elapsed time per execution:      select … Continue reading

Posted in Uncategorized | Leave a comment

DBA_HIST_SNAPSHOT BEGIN and END_INTERVAL_TIME

They say you learn more from your mistakes than your successes.  I’ve been making a big mistake with a script I was using to tell how many logons had occurred between two AWR snapshots.  I don’t want to lead anyone … Continue reading

Posted in Uncategorized | Leave a comment

Working on Performance Toolkit

I’m working on a performance toolkit with a coworker of mine. It is great to have someone else to use the tools I’ve been using, streamline them, and document them for the rest of our team. To figure out what … Continue reading

Posted in Uncategorized | 1 Comment

Fast way to copy data into a table

I have this test script I use to remind myself of the fastest way I’ve found to copy data into an Oracle table.  It shows three things: Fast way to create a new table populating with data Fast way to … Continue reading

Posted in Uncategorized | 5 Comments

Script to show change in query execution

Click here for a simple but useful script that shows how the execution of a given query has changed over time. (current version). This script just queries DBA_HIST_SQLSTAT for a given sql_id. A sql_id corresponds to a single SQL query.  … Continue reading

Posted in Uncategorized | Leave a comment

Script to extract plans from AWR

I use this script all the time to get the plans for a given SQL statement I’ve identified from an AWR report: getplans.sql Recently I’ve found out that you can do something like this with the delivered awr script $ORACLE_HOME/rdbms/admin/awrsqrpt.sql … Continue reading

Posted in Uncategorized | 1 Comment

No detailed documentation for AWR report

One of my coworkers asked a really good question: “Where is the documentation that explains all the sections of the AWR report?” The answer is that there is no comprehensive section-by-section documentation of an AWR report. But, there is a … Continue reading

Posted in Uncategorized | 3 Comments

Oracle Avengers

I couldn’t help notice the Oracle product placement in The Avengers movie as I watched it for the second time in two weeks with my eleven year old daughter.  I was wondering what sort of systems they were supposed to … Continue reading

Posted in Uncategorized | Leave a comment

Updated resources page

I’ve updated the “Resources” page on my blog to include all my old presentation, papers, and scripts that I’ve published before.  I used to have a free Geocities blog but that disappeared.  I’ve been waiting to see if this new … Continue reading

Posted in Uncategorized | Leave a comment