Hi list,

I'm trying to optimise a SELECT ... LIMIT query, perhaps i miss something
important and so, i'm asking your help :)

I'm using MySQL 4.0.15 under Linux.

Here's a test query :
mysql> explain SELECT * FROM F4000 WHERE ReplyTo=8711465 ORDER BY Numero
LIMIT 234599,20;
+-------+------+----------------+----------------+---------+-------+--------
+-------------+
| table | type | possible_keys  | key            | key_len | ref   | rows
| Extra       |
+-------+------+----------------+----------------+---------+-------+--------
+-------------+
| F4000 | ref  | ReplyTo_Numero | ReplyTo_Numero |       4 | const | 188063
| Using where |
+-------+------+----------------+----------------+---------+-------+--------
+-------------+

And here's index description :
mysql> show index from F4000;
| F4000 |          0 | PRIMARY        |          1 | Numero          | A
|     2535091 |     NULL | NULL   |  | BTREE
| F4000 |          1 | ReplyTo_Numero |          1 | ReplyTo         | A
|        NULL |     NULL | NULL   |  | BTREE
| F4000 |          1 | ReplyTo_Numero |          2 | Numero          | A
|        NULL |     NULL | NULL   |  | BTREE

ReplyTo and Numero are both integer.

This query took around 1 sec, could i made something to have better
performance ?

PS : I know that Richard Davey have post a question on limit, 2 two days
ago, but i didn't find anything that can help me.
I also look at http://www.mysql.com/doc/en/LIMIT_optimisation.html without
any success.

Thanks.
David


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to