db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Partial index

A partial index covers only the rows that match its WHERE clause. A "pending orders" screen touches only status = 'new', a small slice of the table.

task

Index only the new orders for a pending screen: SELECT order_id FROM orders WHERE status = 'new' ORDER BY placed_at DESC LIMIT 20.

hints