MySQL Forums
Forum List  »  InnoDB

Offset on index details
Posted by: Alex Stovbun
Date: June 24, 2016 07:26AM

I have the following table (InnoDB):

CREATE TABLE Things (
id INT NOT NULL PRIMARY KEY,
cat INT NOT NULL,
content TEXT,

INDEX CatId (cat, id)
)

The CatId index is used When making the following query

SELECT id FROM Things WHERE cat=1000 ORDER BY id DESC LIMIT 5 OFFSET 30000;


Is the engine able to jump over 30000 index entries to get to the 30001st entry (e.g., by calculating index offset <entry_size> * 30000) or does it still need to scan the first 30000 entries of the index to get to the 30001st?

Options: ReplyQuote


Subject
Views
Written By
Posted
Offset on index details
1703
June 24, 2016 07:26AM
749
June 24, 2016 09:05AM
761
June 24, 2016 09:42AM
1137
June 27, 2016 04:18PM
706
August 17, 2016 07:43PM


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.