Re: Efficient Score in InnoDB
Posted by:
Thomas Rice
Date: September 01, 2008 02:17AM
Hmm, I just tried a very simple query:
EXPLAIN SELECT id FROM players WHERE id>2000 LIMIT 1
and it returns this:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE players range PRIMARY PRIMARY 4 NULL 57177 Using where; Using index
It's an InnoDB table and "id" is my primary key.
I was just wondering why it looks through 57177 rows rather than 1?
Adding ORDER BY id DESC or ORDER BY id ASC doesn't seem to help either.
Thanks.
Subject
Views
Written By
Posted
2387
August 31, 2008 09:35PM
Re: Efficient Score in InnoDB
1529
September 01, 2008 02:17AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.