select * from orders where status = 'open' order by created_at limit 20
Execution time
842ms
-
Limit0.1 ms returns 20 rows
-
Sort118 ms orders 48,300 rows by created_at
-
Seq Scan on orders724 ms reads 1,204,118 rows, keeps 48,300
The scan takes 86% of the time