On Fri, Apr 18, 2003 at 12:55:35 -0700,
Derek Hamilton <derek@capweb.com> wrote:
> Hey Marc,
>
> I've run the EXPLAIN statement on the query and it does use the index.
>
> I also use an "order by" on the table that does not include the indexed
> field. Would adding an index for the fields I'm ordering by help at all?
Maybe. If the search returns only a small portion of the records in the
table it is probably more efficient to use the current index for searching
and then do a sort on the returned records rather than scan the table
in the output order selecting records that match the search criteria.
Also extra indexes will slow down inserts and updates so if you are doing
a lot of those, you need to balance that against your select performance.