Re: select distinct slower in 5.0 than 4.1
The data sets are EXACTLY identical. This is a regular benchmark test I use for my application.
Anyway - I found out the reason:
The table has two indexes. The first index is a BTREE index on lastname. The second index is a unique constraint on PID, lastname.
While 4.1 optimizer is using wisely the first index, 5.0 prefers the second!
My guess is that this happens probably because of some problem in the logic that makes it prefer second since it contains both columns. But - since PID is the first column in the index - it turns out this choice is worst.
What do you think?
Subject
Views
Written By
Posted
3426
December 18, 2005 12:24PM
2660
December 19, 2005 10:49AM
Re: select distinct slower in 5.0 than 4.1
2384
December 20, 2005 10:29AM
2327
December 20, 2005 11:36AM
2312
December 21, 2005 01:54AM
2229
December 20, 2005 08:29PM
2302
December 21, 2005 03:15AM
2374
December 29, 2005 01:55AM
2269
December 27, 2005 06:49PM
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.