Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

Offset on index details (2 replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1954

Trending Articles