Page 1 Loads in 8ms, Page 5,000 Takes 4 Seconds — The OFFSET Trap and How Cursors Fix It
Page 1 loads in 8 ms. Page 5,000 takes four seconds, and the index is not the problem.
4 articles tagged Indexes.
Page 1 loads in 8 ms. Page 5,000 takes four seconds, and the index is not the problem.
"Let the database handle it" works until the write rate grows a hundred times.
DELETE looks like the simplest statement. Under concurrent load it is the most expensive one.
The index existed. The query was written so the database could not use it.