ЗА

Size: a a a
ЗА

ЗА
В
A
A
postgres=# CREATE TABLE t (x INT);
CREATE TABLE
postgres=# INSERT INTO t SELECT i FROM generate_series(1, 1000) AS g(i);
INSERT 0 1000
postgres=# EXPLAIN ANALYZE SELECT x FROM t WHERE x = 42;
QUERY PLAN
--------------------------------------------------------------------------------------------
Seq Scan on t (cost=0.00..17.50 rows=1 width=4) (actual time=0.014..0.078 rows=1 loops=1)
Filter: (x = 42)
Rows Removed by Filter: 999
Planning Time: 0.034 ms
Execution Time: 0.088 ms
(5 rows)
postgres=# EXPLAIN ANALYZE SELECT x FROM t WHERE x = 42 LIMIT 1;
QUERY PLAN
--------------------------------------------------------------------------------------------------
Limit (cost=0.00..17.50 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=1)
-> Seq Scan on t (cost=0.00..17.50 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=1)
Filter: (x = 42)
Rows Removed by Filter: 41
Planning Time: 0.031 ms
Execution Time: 0.020 ms
(6 rows)