postgres=
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=1692478.40..1692478.41 rows=1 width=4) (actual time=32215.384..32215.385 rows=1 loops=1)
Output: max(id)
-> Seq Scan on public.tmax (cost=0.00..1442478.32 rows=100000032 width=4) (actual time=4.656..18766.501 rows=100000000 loops=1)
Output: id
Planning time: 0.132 ms
Execution time: 32215.441 ms
(6 rows)
postgres=
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=1942478.48..1942478.48 rows=1 width=4) (actual time=32789.641..32789.641 rows=1 loops=1)
Output: id
-> Sort (cost=1942478.48..2192478.56 rows=100000032 width=4) (actual time=32789.640..32789.640 rows=1 loops=1)
Output: id
Sort Key: tmax.id
Sort Method: top-N heapsort Memory: 25kB
-> Seq Scan on public.tmax (cost=0.00..1442478.32 rows=100000032 width=4) (actual time=15.948..18095.096 rows=100000000 loops=1)
Output: id
Planning time: 0.101 ms
Execution time: 32789.678 ms
(10 rows)
postgres=
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=1692478.40..1692478.41 rows=1 width=4) (actual time=32411.383..32411.383 rows=1 loops=1)
Output: max(id)
-> Seq Scan on public.tmax (cost=0.00..1442478.32 rows=100000032 width=4) (actual time=10.210..18996.920 rows=100000000 loops=1)
Output: id
Planning time: 0.125 ms
Execution time: 32411.436 ms
(6 rows)
postgres=
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=1942478.48..1942478.48 rows=1 width=4) (actual time=33312.476..33312.477 rows=1 loops=1)
Output: id
-> Sort (cost=1942478.48..2192478.56 rows=100000032 width=4) (actual time=33312.474..33312.474 rows=1 loops=1)
Output: id
Sort Key: tmax.id
Sort Method: top-N heapsort Memory: 25kB
-> Seq Scan on public.tmax (cost=0.00..1442478.32 rows=100000032 width=4) (actual time=8.584..18551.514 rows=100000000 loops=1)
Output: id
Planning time: 0.100 ms
Execution time: 33312.514 ms
(10 rows)
postgres=