SpinTheMic
Pro

Interview practice question

Table slow after large delete

Data Engineering · Redshift · Beginner

After deleting 40 percent of rows from a large table, queries on it didn't get faster. Why?

What a strong answer covers

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

  • Deleted rows still occupy blocks until vacuumed.
  • Queries still scan those blocks.
  • Run VACUUM DELETE ONLY or full VACUUM.
  • Run ANALYZE afterwards.
  • Consider deep copy for very fragmented tables.
Practise this topic

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

See all topics