> does not and is quite fast. Somehow the optimizer is getting confused
> by the "sid = 16". I was thinking that perhaps there is some magic
> way of rephrasing the problem that MySQL would understand better.
> Failing that, what is the recommended way of making this query
> quicker? Should I insert another index, for instance called
> negative_id that is always (4294967296 - id) or something like that,
> so I can ORDER BY negative_id instead of ORDER BY id DESC?
>
> Thank you for any advice or suggestions you might have.
Perhaps ORDER BY (column * -1), if the column is numeric would be
sufficient. But that might also make the optimizer less willing to use the
index for sorting. Also I think MySQL will use filesort when the returned
result is large, but I could be wrong.
ryan
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php