List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:July 26 2002 9:19am
Subject:Re: Accessing multiple indexes
View as plain text  
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> 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
This email is sponsored by
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB /

Accessing multiple indexesSteve Orr25 Jul
  • Re: Accessing multiple indexesDan Nelson26 Jul
  • Re: Accessing multiple indexesEgor Egorov26 Jul
RE: Accessing multiple indexesAnders Nielsen26 Jul