|
|
|
|
|
by acqq
3972 days ago
|
|
In short, if I understood, the author used SELECT c,d FROM t WHERE b=X ORDER BY a DESC LIMIT 1 on MySQL and was surprised to find that MySQL was using index over a and in his opinion fully ignored the existence of the index over (b,c) to discover where b is equal to X? I admit I didn't understand his explanation why, especially not why it would maybe do the right thing with the LIMIT 2. I can't imagine that any serious SQL engine would ignore the possibility to use the index in such a case. |
|