Home » RDBMS Server » Performance Tuning » Less Cost,Cardinality,Bytes Query is taking More time to execute
Less Cost,Cardinality,Bytes Query is taking More time to execute [message #487930] Mon, 03 January 2011 08:08 Go to next message
gururajster
Messages: 26
Registered: October 2006
Location: bangalorre
Junior Member

Hi All,

Just thought of sharing this strange behaviour in my query.

Query1-Cost,Cardinality and Bytes is more but still execution is
faster and takes 1sec to execute and get the results.

Query2-Cost,Cardinality and Bytes is very less say 50% less then the Query 1 but it takes 15min to execute and get the results.

Both Query 1 and Query 2 gives the same amount of records having different sql approach to get the data from the database.

Can anyone tell me why this strange behaviour.I believe if the cost,cardinality and bytes are less then the query should execute and get the result faster but here it is totally different.

Can anyone put some light on this.I appreciate your patience in answering my question.Hoping for your help:)

Guru
Re: Less Cost,Cardinality,Bytes Query is taking More time to execute [message #487932 is a reply to message #487930] Mon, 03 January 2011 08:20 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Not Essentially.
It all depends on available statistics, sql you used and your Oracle version.
Do 10053 trace and you will see why optimizer chose that particular plan.

[Updated on: Mon, 03 January 2011 08:23]

Report message to a moderator

Previous Topic: ADDM report
Next Topic: Parse once - Execute many
Goto Forum:
  


Current Time: Fri Nov 22 01:23:17 CST 2024