Friday, July 26, 2002, 12:13:17 AM, you wrote:
O> It's my understanding that MySQL will only use one index per table on a
O> given query. For example...
O> SELECT * FROM <HUGE_TABLE>
O> WHERE <col1> = <val1>
O> AND <col2> < <val2>
O> AND <col3> > <val3> ;
O> If col1, col2, and col3 are indexed the query can only use one index, right?
O> Single index access is a problem when you very large tables. What if you
O> have a query with a result set of just 10 rows but there are no indexed
O> columns that can limit the result set to < 1 million rows? I really need to
O> be able to use multiple indexes in a single table query and I don't want to
O> have to perform self joins or create temp tables.
Create index on several columns:
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ Egor.Egorov@stripped
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net