db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Skip scan

The primary key is (device_id, ts). A query on ts alone can still use it: the index skips from one device_id to the next.

task

With seq scans off, run EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) for counting readings where ts = '2026-02-01 00:00+00' and find the Index Searches line.

hints