Chris wrote:
>> My point here was the if you index on (a, b), you don't need to index on
>> (b, a) if both a and b are present in your where clause. The index is
>> read from left to right -- not the where clause.
>
> Sure you do. Look at the OP's problem and you'll see you still do.
>
> To quote
robertom wrote:
Chris wrote:
Roberto Mansfield wrote:
It shouldn't matter what order the columns are referenced. Mysql is
smart enough to optimize the query based on the available indexes.
In some cases yes but as with anything there are exceptions :)
mysql (and every other db) gets it wrong
> Chris wrote:
>> Mysql will actually only use one index per table. I was surprised to
>> find this out but it's mentioned in
>> http://www.amazon.com/High-Performance-MySQL-Jeremy-Zawodny/dp/0596003064/
>> - page 64 (just looked it up to include a page ref).
>>
>> No idea if this is mentioned anyw
Chris wrote:
> Roberto Mansfield wrote:
>> It shouldn't matter what order the columns are referenced. Mysql is
>> smart enough to optimize the query based on the available indexes.
>
> In some cases yes but as with anything there are exceptions :)
>
> mysql (and every other db) gets it wrong some
Roberto Mansfield wrote:
It shouldn't matter what order the columns are referenced. Mysql is
smart enough to optimize the query based on the available indexes.
In some cases yes but as with anything there are exceptions :)
mysql (and every other db) gets it wrong sometimes.
In fact, it shoul
It shouldn't matter what order the columns are referenced. Mysql is
smart enough to optimize the query based on the available indexes. In
fact, it should be good enough just to create an index on each column
that will be searched -- not on combinations of columns. Do you have any
performance number
Hello
I did look into the info from EXPLAIN. I can create the indexes also but
then I have to create indexes with all permutation of column order if I want
to get good performance from all search query regardless of what order user
enters the column.
On 10/23/07, Theodoros Goltsios <[EMAIL PROTEC
I guess EXPLAIN will do the job for you. First of all in order to ensure
what is the index used by your queries and then how to improve
performance by making the right indexes.
Theodoros Goltsios
Kinetix Tele.com Support Center
email: [EMAIL PROTECTED], [EMAIL PROTECTED]
Tel. & Fax: +30 2310556