Database Tuning (MOSC)

MOSC Banner

newbie question about cost of optimizer vs time of querry!

edited May 14, 2009 2:15AM in Database Tuning (MOSC) 2 commentsAnswered
Hello

I was give a huge querry (which is used to form a view) to optimize and with sqlplus and autotrace/tkprof I got an initial cost of 431 and about 7 seconds total time elapse (set timing on in sqlplus and alter session flush shared_pool, first time execution).

I spend a lot of time tuning this query and it ended up written in a pipelined function within a package. Now the view is used to select from the function instead.

The cost is now 23.

I would have expected to see BIG improvement in the total time... maybe not as much a ration as with the cost because there is latency in network, cpu, disks &c... but at least a noticable improvement.

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