explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jl6k

Settings
# exclusive inclusive rows x rows loops node
1. 1,704.213 20,550.267 ↓ 1.2 1,641,035 1

Finalize GroupAggregate (cost=325,777.44..705,169.28 rows=1,323,603 width=16) (actual time=10,568.423..20,550.267 rows=1,641,035 loops=1)

  • Output: numero, ((numero % 2)), count(*)
  • Group Key: numeros.numero, ((numeros.numero % 2))
  • Buffers: shared hit=5 read=7641 dirtied=5, temp read=6142 written=6173
2. 7,730.251 18,846.054 ↓ 1.2 3,162,083 1

Gather Merge (cost=325,777.44..668,770.20 rows=2,647,206 width=16) (actual time=10,568.384..18,846.054 rows=3,162,083 loops=1)

  • Output: numero, ((numero % 2)), (PARTIAL count(*))
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=59 read=22184 dirtied=5, temp read=17686 written=17775
  • -> Partial GroupAggregate (cost=324777.42..362216.92 rows=1323603 width=16) (actual time=10356.389..12054.829 rows=1054028 l
  • Output: numero, ((numero % 2)), PARTIAL count(*)
  • Group Key: numeros.numero, ((numeros.numero % 2))
  • Buffers: shared hit=59 read=22184 dirtied=5, temp read=17686 written=17775
  • Worker 0: actual time=10229.632..11837.197 rows=1033236 loops=1
  • Buffers: shared hit=27 read=7160, temp read=5656 written=5685
  • Worker 1: actual time=10276.976..11927.713 rows=1055166 loops=1
  • Buffers: shared hit=27 read=7383, temp read=5888 written=5917
3. 11,115.803 11,115.803 ↑ 1.2 1,671,564 3 / 3

Sort (cost=324,777.42..330,001.03 rows=2,089,446 width=8) (actual time=10,356.295..11,115.803 rows=1,671,564 loops=3)

  • Output: numero, ((numero % 2))
  • Sort Key: numeros.numero, ((numeros.numero % 2))
  • Sort Method: external merge Disk: 30496kB
  • Worker 0: Sort Method: external merge Disk: 28568kB
  • Worker 1: Sort Method: external merge Disk: 29448kB
  • Buffers: shared hit=59 read=22184 dirtied=5, temp read=17686 written=17775
  • Worker 0: actual time=10229.535..10947.819 rows=1618160 loops=1
  • Buffers: shared hit=27 read=7160, temp read=5656 written=5685
  • Worker 1: actual time=10276.881..11036.271 rows=1668558 loops=1
  • Buffers: shared hit=27 read=7383, temp read=5888 written=5917
  • -> Parallel Seq Scan on public.numeros (cost=0.00..48307.07 rows=2089446 width=8) (actual time=3.929..3137.926 r
  • Output: numero, (numero % 2)
  • Buffers: shared hit=5 read=22184 dirtied=5
  • Worker 0: actual time=3.669..2944.937 rows=1618160 loops=1
  • Buffers: shared read=7160
  • Worker 1: actual time=0.325..3154.871 rows=1668558 loops=1
  • Buffers: shared read=7383
Planning time : 9.398 ms
Execution time : 20,869.598 ms