From: Dan Nelson Date: July 26 2002 4:38am Subject: Re: Accessing multiple indexes List-Archive: http://lists.mysql.com/mysql/115619 Message-Id: <20020726043816.GF62267@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Jul 25), Orr, Steve said: > It's my understanding that MySQL will only use one index per table on > a given query. For example... > > SELECT * FROM > WHERE = > AND < > AND > ; > > If col1, col2, and col3 are indexed the query can only use one index, > right? > > Single index access is a problem when you very large tables. What if > you have a query with a result set of just 10 rows but there are no > indexed columns that can limit the result set to < 1 million rows? I > really need to be able to use multiple indexes in a single table > query and I don't want to have to perform self joins or create temp > tables. Create a compound index on (col1,col2,col3). -- Dan Nelson dnelson@stripped