Andrey Hristov wrote:
HI,
I don't know is it bad or not but I face queries the work quite long time.
the sql is :
select * from log_answers_index limit 0,10
and it takes too much time for me to receive the result.
I got indexes on most of the fields, i got primary key which is
auto_increment int(11). When I did explain on the query I got this :
type : ALL
rows : 123010
all other cells are empty.
When I do :
select * from log_answers_index where log_entry_index between 1 and 10
i got type : range
For me it is strange that the primary key is not used when there is LIMIT
What would be the point?
Without a WHERE or an ORDER BY, using an index would slow it down.
clause without WHERE one.
Best regards
Andrey Hristov
---------------------------------------------------------------------
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