Menu

Post image 1
Post image 2
1 / 2
0

24/30 Days System Design Questions

DEV Community: database·Joud Awad·2 days ago
#f9RmFvn5
Reading 0:00
15s threshold

Your API returns 10 million orders. The frontend asks for "page 5." Offset 40, limit 10. Simple enough — until your DBA messages you at 2 AM. Query time: 4.2 seconds. Table scans climbing. Prod is lagging. Here's the stack: PostgreSQL, 50M rows in orders, sorted by created_at DESC. Users can filter by status. You're paginating an admin dashboard used by 200 concurrent support agents. Offset pagination worked fine at 10K rows. At 50M, it's reading and discarding 40 million rows just to return 10. You need to fix this before the next sprint ships the customer-facing version — which will have 10x the traffic.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More