Home » RDBMS Server » Performance Tuning » CBO Query re-write (Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit, HP-UX)
CBO Query re-write [message #540322] Sat, 21 January 2012 23:56 Go to next message
manubatham20
Messages: 562
Registered: September 2010
Location: Seattle, WA, USA
Senior Member

Hi,

My question is regarding the working of CBO.

While executing a query, CBO generates an explain/execution plan for the query. Does CBO does the work of query re-write to optimize it? If yes, can I get the query re-written by CBO?

Thanks!!
Manu
Re: CBO Query re-write [message #540327 is a reply to message #540322] Sun, 22 January 2012 00:38 Go to previous messageGo to next message
Michel Cadot
Messages: 67948
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Does CBO does the work of query re-write to optimize it?

Yes.

Quote:
If yes, can I get the query re-written by CBO?

You can't. It may rewrite it in a way that is not in the SQL syntax and is stored in any place (in clear, it is stored in a binary format as the execution plan).

Regards
Michel
Re: CBO Query re-write [message #540328 is a reply to message #540327] Sun, 22 January 2012 00:40 Go to previous message
Michel Cadot
Messages: 67948
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You may read:
Database Performance Tuning Guide
Chapter 13 The Query Optimizer
Section 13.4 Understanding the Query Optimizer

Regards
Michel

Previous Topic: Please help me tune this sql
Next Topic: Query execution path
Goto Forum:
  


Current Time: Wed Sep 22 20:49:52 CDT 2021