Hi.
On Fri, Apr 12, 2002 at 02:49:03PM +0200, [EMAIL PROTECTED] wrote:
[...]
> mysql> explain select * from news where category = 'x' order by category DESC,
>provider_date DESC;
>
>+-------+------+------------------------+------------------------+---------+-------+------+----------------------------+
> | table | type | possible_keys | key | key_len | ref |
>rows | Extra |
>
>+-------+------+------------------------+------------------------+---------+-------+------+----------------------------+
> | news | ref | category_provider_date | category_provider_date | 50 | const |
> 1 | where used; Using filesort |
>
>+-------+------+------------------------+------------------------+---------+-------+------+----------------------------+
> 1 row in set (0.00 sec)
>
> Why is filesort used here?
> According to the MySQL doc (5.2.7, example 5) this should work
> using the index without any additional sorting.
>
> MySQL-3.23.49-max-log running on FreeBSD 4.4-RELEASE
I assume you are referring to the online manual? It's documenting the
most recent version. According to the change history (Appendix D),
this optimization was introduced in version 4.0.2.
Bye,
Benjamin.
--
[EMAIL PROTECTED]
---------------------------------------------------------------------
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