SpinTheMic
Pro

Interview practice question

Table grows forever

System Design · Databases · Intermediate

An events table grows by 100 million rows a month and queries are getting slower. Most queries only need the last 30 days. What do you do?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Partition table by time (monthly).
  • Queries prune to recent partitions.
  • Archive old partitions to cheap storage.
  • Drop partitions instead of DELETE.
  • Keep summaries of old data.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics