Subject | Re: Index for ascending and descending order? |
---|---|
Author | svanderclock |
Post date | 2009-04-16T11:49:53Z |
> Once again: you don't.what???? of course not !! for ordering index can be very very important !! if you have a result set of 1.000.000 record and want to diplay only the 200 last items, and also you are a web server than handle thousand of request every second, how you do if you don't have index on ordering ???
> Indexes are useful for data filtering. For ordering they are less useful.
It's easy : if you result set is little then it's better to use the index in the filtering, if you result set is important it's better to use the index on the ordering ! this thing like this, the optimizer can't choose the best way, and this why we MUST sometime use ourself the PLAN ! i see some query that can go from 1 minute to 0.1 seconde depend of with way you choose