explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Da9H

Settings
# exclusive inclusive rows x rows loops node
1. 2.500 502,932.539 ↑ 2.0 14 1

Sort (cost=2,769,920.62..2,769,920.69 rows=28 width=104) (actual time=502,932.443..502,932.539 rows=14 loops=1)

  • Sort Key: (count(gl_global_40m.gl_business_unit_code)) DESC
  • Sort Method: quicksort Memory: 26kB
  • Buffers: shared hit=208944 read=463885
2. 2.144 502,930.039 ↑ 2.0 14 1

HashAggregate (cost=2,769,919.67..2,769,919.95 rows=28 width=104) (actual time=502,929.934..502,930.039 rows=14 loops=1)

  • Group Key: ('local'::text), gl_global_40m.gl_local_amount_currency, gl_global_40m.gl_business_unit_code, (count(gl_global_40m.gl_business_unit_code))
  • Buffers: shared hit=208944 read=463885
3. 0.258 502,927.895 ↑ 2.0 14 1

Append (cost=1,384,954.31..2,769,919.39 rows=28 width=104) (actual time=263,078.172..502,927.895 rows=14 loops=1)

  • Buffers: shared hit=208944 read=463885
4. 0.000 263,078.705 ↑ 3.0 7 1

Finalize GroupAggregate (cost=1,384,954.31..1,384,962.45 rows=21 width=56) (actual time=263,078.142..263,078.705 rows=7 loops=1)

  • Group Key: gl_global_40m.gl_local_amount_currency, gl_global_40m.gl_business_unit_code
  • Buffers: shared hit=88803 read=197498
5. 53.613 263,091.191 ↑ 2.2 28 1

Gather Merge (cost=1,384,954.31..1,384,961.77 rows=63 width=24) (actual time=263,077.882..263,091.191 rows=28 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=357631 read=796503
6. 0.622 263,037.578 ↑ 3.0 7 4 / 4

Sort (cost=1,383,954.27..1,383,954.32 rows=21 width=24) (actual time=263,037.511..263,037.578 rows=7 loops=4)

  • Sort Key: gl_global_40m.gl_local_amount_currency, gl_global_40m.gl_business_unit_code
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
  • Worker 2: Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=357631 read=796503
7. 99,124.044 263,036.956 ↑ 3.0 7 4 / 4

Partial HashAggregate (cost=1,383,953.60..1,383,953.81 rows=21 width=24) (actual time=263,036.858..263,036.956 rows=7 loops=4)

  • Group Key: gl_global_40m.gl_local_amount_currency, gl_global_40m.gl_business_unit_code
  • Buffers: shared hit=357607 read=796503
8. 163,912.912 163,912.912 ↑ 1.3 10,179,275 4 / 4

Parallel Seq Scan on gl_global_40m (cost=0.00..1,285,449.20 rows=13,133,920 width=16) (actual time=1.387..163,912.912 rows=10,179,275 loops=4)

  • Buffers: shared hit=357607 read=796503
9. 0.000 239,848.932 ↑ 1.0 7 1

Finalize GroupAggregate (cost=1,384,953.81..1,384,956.52 rows=7 width=56) (actual time=239,848.533..239,848.932 rows=7 loops=1)

  • Group Key: gl_global_40m_1.gl_reporting_amount_currency, gl_global_40m_1.gl_business_unit_code
  • Buffers: shared hit=120141 read=266387
10. 801.349 239,989.833 ↑ 1.0 21 1

Gather Merge (cost=1,384,953.81..1,384,956.29 rows=21 width=24) (actual time=239,845.701..239,989.833 rows=21 loops=1)

  • Workers Planned: 3
  • Workers Launched: 2
  • Buffers: shared hit=357751 read=796375
11. 0.807 239,188.484 ↑ 1.0 7 3 / 3

Sort (cost=1,383,953.77..1,383,953.79 rows=7 width=24) (actual time=239,188.381..239,188.484 rows=7 loops=3)

  • Sort Key: gl_global_40m_1.gl_reporting_amount_currency, gl_global_40m_1.gl_business_unit_code
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=357751 read=796375
12. 108,554.893 239,187.677 ↑ 1.0 7 3 / 3

Partial HashAggregate (cost=1,383,953.60..1,383,953.67 rows=7 width=24) (actual time=239,187.615..239,187.677 rows=7 loops=3)

  • Group Key: gl_global_40m_1.gl_reporting_amount_currency, gl_global_40m_1.gl_business_unit_code
  • Buffers: shared hit=357735 read=796375
13. 130,632.784 130,632.784 ↓ 1.0 13,572,366 3 / 3

Parallel Seq Scan on gl_global_40m gl_global_40m_1 (cost=0.00..1,285,449.20 rows=13,133,920 width=16) (actual time=1.607..130,632.784 rows=13,572,366 loops=3)

  • Buffers: shared hit=357735 read=796375