Home » RDBMS Server » Performance Tuning » choosing the right query
choosing the right query [message #124412] Sat, 18 June 2005 04:02 Go to next message
srraajesh
Messages: 63
Registered: May 2005
Member
I have two sql queries. It is a join on two tables.

Query 1>

Does not use index on one table. The consistent get count in autotrace is around 15.

Query 2>

Uses index on both the tables. The consistent get count in autotrace is 360.

The rest of the parameters in autotrace output is the same. Can anyone help me out in choosing the right one??

Thanks much
Raajesh
Re: choosing the right query [message #124440 is a reply to message #124412] Sat, 18 June 2005 09:28 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Choose the one that gets the right answer?

Choose the one that runs the fastest?
Re: choosing the right query [message #124481 is a reply to message #124412] Sun, 19 June 2005 04:10 Go to previous messageGo to next message
srraajesh
Messages: 63
Registered: May 2005
Member
Both the queries gives the correct answer only.

Could you please explain the significance in terms of consistent gets..

Thanks
Raajesh
Re: choosing the right query [message #124484 is a reply to message #124481] Sun, 19 June 2005 06:23 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
YOu have asked the same question and has been answered before.

http://www.orafaq.com/forum/t/47427/42800/
Previous Topic: how to avoid the full table scan?
Next Topic: Measuring time exection
Goto Forum:
  


Current Time: Thu Mar 28 16:09:03 CDT 2024