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=7,641 dirtied=5, temp read=6,142 written=6,173
  • Execution Time: 20,869.598 ms(37 registros)
2. 6,791.225 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=22,184 dirtied=5, temp read=17,686 written=17,775
3. 939.026 12,054.829 ↑ 1.3 1,054,028 3 / 3

Partial GroupAggregate (cost=324,777.42..362,216.92 rows=1,323,603 width=16) (actual time=10,356.389..12,054.829 rows=1,054,028 loops=3)

  • Output: numero, ((numero % 2)), PARTIAL count(*)
  • Group Key: numeros.numero, ((numeros.numero % 2))
  • Buffers: shared hit=59 read=22,184 dirtied=5, temp read=17,686 written=17,775
  • Worker 0: actual time=10,229.632..11837.197 rows=1,033,236 loops=1
  • Buffers: shared hit=27 read=7,160, temp read=5,656 written=5,685
  • Worker 1: actual time=10,276.976..11927.713 rows=1,055,166 loops=1
  • Buffers: shared hit=27 read=7,383, temp read=5,888 written=5,917
4. 7,977.877 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: 30,496kB
  • Worker 0: Sort Method: external merge Disk: 28,568kB
  • Worker 1: Sort Method: external merge Disk: 29,448kB
  • Buffers: shared hit=59 read=22,184 dirtied=5, temp read=17,686 written=17,775
  • Worker 0: actual time=10,229.535..10947.819 rows=1,618,160 loops=1
  • Buffers: shared hit=27 read=7,160, temp read=5,656 written=5,685
  • Worker 1: actual time=10,276.881..11036.271 rows=1,668,558 loops=1
  • Buffers: shared hit=27 read=7,383, temp read=5,888 written=5,917
5. 3,137.926 3,137.926 ↑ 1.2 1,671,564 3 / 3

Parallel Seq Scan on public.numeros (cost=0.00..48,307.07 rows=2,089,446 width=8) (actual time=3.929..3,137.926 rows=1,671,564 loops=3)

  • Output: numero, (numero % 2)
  • Buffers: shared hit=5 read=22,184 dirtied=5
  • Worker 0: actual time=3.669..2944.937 rows=1,618,160 loops=1
  • Buffers: shared read=7,160
  • Worker 1: actual time=0.325..3154.871 rows=1,668,558 loops=1
  • Buffers: shared read=7,383
Planning time : 9.398 ms