Все платежи заказа
Все платежи заказа
Бухгалтерия сверяет платежи по конкретному заказу. Платежей у заказа один-два, таблица — сто двадцать тысяч строк. Дайте машине дорогу к платежам заказа.
Speed this query up with an index
SELECT * FROM payments WHERE order_id = 54321
Just CREATE/ALTER/DROP — no trailing SELECT needed.
What counts as solved
You may only change the schema: indexes and ANALYZE. The query stays as the task wrote it — no need to send it back.
- the plan has no Seq Scan on payments
- the query reads at most 8 8 KB pages
Grading runs on a larger dataset than the samples show — the answer has to hold at scale.
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid