Page 5,000

  • Fix
  • Store 11

Difficulty 2 of 5

Page 5,000 has 50 rows after 249,950 earlier rows. OFFSET visits all of those earlier rows on every request. Keep p99 below 100 ms.

0:00. Deep pages are slow. Graph: rows read per request grow with the page number.

Play level

SQLUsers500 req/sPostgres1 vCPU · 2 GB
SQLUsers500 req/sPostgres1 vCPU · 2 GB
The board at the start of the level
An index against a full scanTap to add or remove the index

Index · 4 pages read per query · disk writes per insert: 2

Goals and limits

p99 latency
under 100 ms
Monthly cost
under 50 USD/mo
Parts you can add
Postgres
Part limit
16
Edit limit
3
Traffic
500 req/s

Concepts

How players did

Player results load from the server.