Re: Slow Query Time for Many Records from Large Table
I guess both the query uses the index.
Note that your count(*) returns about 40,000 and the other only 49.
With 40,000 rows having the same value, you will need to check a lot more index nodes than 49 matching rows, so more processing is required.
And more index nodes require more index pages to be read from the disk, of course the key_buffer will help with caching the index pages.
What do you think about doing a simple loop that loops 49 times compared to a loop that loops 40,000 times? Do you expect them to take the same amount of time?
Subject
Views
Written By
Posted
2533
November 08, 2005 05:04AM
1372
November 08, 2005 08:08AM
1335
November 08, 2005 02:21PM
1372
November 08, 2005 02:40PM
1377
November 08, 2005 03:34PM
1470
November 08, 2005 04:10PM
1426
November 08, 2005 05:09PM
1550
November 08, 2005 09:51PM
1317
November 11, 2005 05:54AM
Re: Slow Query Time for Many Records from Large Table
1345
November 08, 2005 08:05PM
1325
November 11, 2005 06:10AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.