Database Tuning (MOSC)

MOSC Banner

Discrepancy Between Plan Cost and Actual Elapsed Time

edited Jul 19, 2012 1:40AM in Database Tuning (MOSC) 12 comments

Greeting All.
I just rewrote a SQL query to improve it's performance. The new query uses the same tables and returns the same result. The elapsed time reduced by 40% (not a lot), but plan cost increased by 94 times! All statistics are up to date and I executed each query multiple times. I could not believe that. So I checked SQL statistics and actual plans in EM Cloud Control (formerly Grid Control) and found the same. See below. Have any of you seen this kind of discrepancy, or am I missed some important points? The DB version is 11.2 on Linux-64.

Original statistics (4.83/exec):

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center