Home » SQL & PL/SQL » SQL & PL/SQL » How to find (full) Cost of a query?
How to find (full) Cost of a query? [message #200863] Wed, 01 November 2006 12:46 Go to next message
blazingrock4u
Messages: 30
Registered: March 2006
Location: India
Member

Can someone explain the process/method using which, one can find the cost of a query?
Re: How to find (full) Cost of a query? [message #200865 is a reply to message #200863] Wed, 01 November 2006 12:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
It is a broad topic to be 'typed' over here in a forum.
The documentation and book by Jonathan lewis( covers whatever that is not discussed in documentation) will give a great account on this topic.
Long story short, CBO does that for you.
If you are interested in knowing Why CBO chose a specific plan (for a specific query) you need to look into a 10053 trace .
COST of the query depends on available statistics and distribution of data.
Explain Plan / sql trace is the widely used tools to find the cost of a query.

[Updated on: Wed, 01 November 2006 13:02]

Report message to a moderator

Re: How to find (full) Cost of a query? [message #200867 is a reply to message #200863] Wed, 01 November 2006 13:10 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
And a few good reads like this
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:40112614814595
May be useful for you.
If you are more interested, the Book "Cost based oracle fundamentals" by J.Lewis is the one stop resource.
For 10053 trace, google for "Wolfgang Breitling 10053" (J.Lewis has also covered the same in his book).
Re: How to find (full) Cost of a query? [message #201584 is a reply to message #200863] Sun, 05 November 2006 23:31 Go to previous message
Admin@Lightsql.Com
Messages: 36
Registered: November 2006
Member

blazingrock4u

I hope you know the explain plan of oracle that gives cost of the query. It depends of which oracle version you are using? Quick reading on explain plan will give you the details.

Jayg
Fun Programming with Oracle & Visual C++, Author of lightsql
Previous Topic: how do i use the dictionary to know there is on delete cascade??
Next Topic: Missing Parenthesis error
Goto Forum:
  


Current Time: Sun Dec 04 02:53:32 CST 2016

Total time taken to generate the page: 0.04411 seconds