Tag: sql

Pro-active AWR Data Mining to Find Change in SQL Execution Plan

Many times we have been called for the poor performance of a database and it has been narrowed down to a  SQL statement. Subsequent analysis have shown that the execution plan has been changed and a wrong execution plan was being…

Read More >

How to Tune Using v$mystat

When reviewing the performance of some queries, it is sometimes useful to review the sessions statistics for each execution of the query. I had a situation that required to look at these stats so I could see why one query would run fast and sometimes much slower. I wrote a simple wrapper ksh shell script for the query. It saves the session statistics in a table before and after the execution of the query and then prints out the statistics in a pivot report. This turned out to be very handy to me and therefore I chose to share it with the world :)

Read More >

REGEXP_REPLACE: Auto-Translate SQL Literals to Bind Vars

In this post I show you how to get SQL strings transformed in a way that resembles the result of cursor_sharing.

Read More >