QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.29..1515.83 rows=1 width=80) (actual time=25.194..25.194 rows=0 loops=1) -> Nested Loop (cost=0.29..504674.12 rows=333 width=80) (actual time=25.193..25.193 rows=0 loops=1) Join Filter: (big.id = small.id) -> Index Scan Backward using big_pkey on big (cost=0.29..5152.29 rows=100000 width=44) (actual time=0.005..12.933 rows=100000 loops=1) -> Materialize (cost=0.00..22.66 rows=333 width=36) (actual time=0.000..0.000 rows=0 loops=100000) -> Seq Scan on small (cost=0.00..21.00 rows=333 width=36) (actual time=0.145..0.145 rows=0 loops=1) Filter: ((id)::numeric > '1000'::numeric) Rows Removed by Filter: 1000 Planning Time: 0.215 ms Execution Time: 25.214 ms (10 rows)