You have a sort because you did an order by.
If you had an index with the desired order by, it may be used.
Try as you usage of covering indexes.

you certainly know that one multi-column index is similar to a lot of
multi-column others when desired columns are in the right position of columns
used in the index.

this may let you implement less than 40 indexes. Otherwise force mls_num in all
indexes you create an add it in the queries that doesn't use it with an always
true condition (nls_num >=0 for example)


Mathias

Selon Scott Gifford <[EMAIL PROTECTED]>:

> [EMAIL PROTECTED] writes:
>
> > hi,
> > mls_num is not in a key, have you tried index creation on (zip,price
> > desc,mls_num) ?
>
> Hi mathias,
>
> mls_num is the primary key, so it does have its own index.
>
> I could create a multi-column index covering (zip,price,mls_num), but
> that was really just one example of many searches; there are about 10
> fields that are commonly used for searches, and about 4 that are
> commonly sorted by, so creating all of those indexes would require 40
> indexes, and that's if the searches only use one field.
>
> ----ScottG.
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to