SpinTheMic
Pro

Interview practice question

Choosing a sort key for a new fact table

Data Engineering · Redshift · Intermediate

You're creating a new events fact table in Redshift. Most queries filter by event date and sometimes by customer. How do you choose the sort key?

What a strong answer covers

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

  • Lead with the most common range filter: event date.
  • Compound sort key on date, optionally followed by customer.
  • Load data in date order to keep it sorted.
  • AUTO is an option if patterns are unknown.
  • Validate with query profiles after go-live.
Practise this topic

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

See all topics