Oracle Performance Firefighting
by Craig Shallahamer

Get the book here



Craig Shallahamer's Blog

You were brought to this page based on an internet search and as a free service to Oracle DBAs.

The text below is an except from the book, Oracle Performance Firefighting, written by Craig Shallahamer of OraPub, Inc. Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click here.


©2009, 2010 by Craig Shallahamer. This is copyrighted material.
Please—Out of respect for those involved in the creation of the book and also for their familes, we ask you to respect the copyright both in intent and deed. Thank you.

-------------------------------

If you know your application SQL well, you may be aware that this exact SQL does not actually exist anywhere in the application. In fact, if you checked the SQL the application submits to Oracle, it may look like this:

What you are seeing is the result of Oracle automatically transforming SQL so it becomes more shareable. Oracle calls this feature cursor sharing. The related instance parameter, cursor_sharing, can take three options and can be altered at both the session and system level. With a value of exact, no transformation occurs. With a value of similar, Oracle looks for bind variables and transform them in, what I call, a kinder and gentler fashion. When set to force, Oracle transforms any and every literal value into a bind variable.

If you ask a group of performance analysts about their experiences with cursor sharing, you'll immediately get a seemingly conflicting and passionate discussion. Some, like myself, have had wonderful experiences with the similar option; others have had all sorts of problems. Some who have used the force option have seen their application SQL so aggressively transformed that the SQL result set was actually different.3 For example, instead of returning ten rows, the SQL returned two rows, effectively breaking the application!

©2009, 2010 by Craig Shallahamer. This is copyrighted material.
Please—Out of respect for those involved in the creation of the book and also for their familes, we ask you to respect the copyright both in intent and deed. Thank you.


Know what's important before it's too late!

OraPub's
Performance Training

is like no other...





More Class Pics...
Get student testimonials!