hard20 pts · first answer countsindexingpostgresqlperformance
Index for the few pending rows
A jobs table has 50 million rows, 99.9% with status 'done'. Workers run: SELECT * FROM jobs WHERE status = 'pending' ORDER BY created_at LIMIT 100. Which index is best?