In PostgreSQL, the output of an EXPLAIN clause can be beefed up a little to provide you with more information. To extract as much as possible out of a plan, consider turning the following options on:
test=# EXPLAIN (analyze, verbose, costs, timing, buffers) SELECT * FROM a ORDER BY random(); QUERY PLAN ----------------------------------------------------------------- Sort (cost=834.39..859.39 rows=10000 width=12) (actual time=6.089..7.199 rows=10000 loops=1) Output: aid, (random()) Sort Key: (random()) Sort Method: quicksort Memory: 853kB Buffers: shared hit=45 -> Seq Scan on public.a (cost=0.00..170.00 rows=10000 width=12) (actual time=0.012..2.625 rows=10000 loops=1) Output: aid, random() Buffers: ...