Build an index on a hot table without blocking writers
On a hot production table you can't take a heavy lock for index creation — the whole write flow stalls. In production the index is added in a non-blocking mode (CONCURRENTLY) and built in the background without stopping the service. Sandbox caveat: the grader runs your SQL inside a transaction, and Postgres forbids non-blocking index builds inside a transaction.
So in this task use a plain index build — the grader only checks that the index exists. Build an index named events_user_kind_idx on events over the columns user_id and kind.
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in