explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fi5s

Settings
# exclusive inclusive rows x rows loops node
1. 278.149 109,627.488 ↑ 7,585.8 11,259 1

Hash Join (cost=994,453.25..1,007,722.70 rows=85,409,082 width=160) (actual time=109,079.260..109,627.488 rows=11,259 loops=1)

  • Hash Cond: (stmt_0.id = stmt_1.id)
2. 140.410 96,643.073 ↓ 1.5 67,917 1

Gather Merge (cost=777,846.45..785,979.89 rows=44,772 width=124) (actual time=96,287.657..96,643.073 rows=67,917 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 44.148 96,502.663 ↓ 1.2 22,639 3 / 3

Merge Anti Join (cost=776,846.43..779,812.06 rows=18,655 width=124) (actual time=96,225.590..96,502.663 rows=22,639 loops=3)

  • Merge Cond: (super_individuals.id = tmp_individuals_aggregations_1.super_individual_id)
4. 1,060.383 78,731.054 ↑ 1.4 26,742 3 / 3

Sort (cost=679,638.92..679,732.19 rows=37,310 width=124) (actual time=78,579.021..78,731.054 rows=26,742 loops=3)

  • Sort Key: super_individuals.id
  • Sort Method: external merge Disk: 2904kB
  • Worker 0: Sort Method: external merge Disk: 2824kB
  • Worker 1: Sort Method: external merge Disk: 2784kB
5. 6,340.042 77,670.671 ↑ 1.4 26,742 3 / 3

Hash Join (cost=99,854.26..674,380.23 rows=37,310 width=124) (actual time=14,437.531..77,670.671 rows=26,742 loops=3)

  • Hash Cond: (super_individuals.id = stmt_0.id)
6. 56,964.240 56,964.240 ↑ 1.3 2,442,129 3 / 3

Parallel Seq Scan on super_individuals (cost=0.00..487,991.92 rows=3,060,592 width=80) (actual time=1.316..56,964.240 rows=2,442,129 loops=3)

7. 89.451 14,366.389 ↑ 1.1 80,225 3 / 3

Hash (cost=97,946.96..97,946.96 rows=89,544 width=44) (actual time=14,366.389..14,366.389 rows=80,225 loops=3)

  • Buckets: 65536 Batches: 2 Memory Usage: 2392kB
8. 66.403 14,276.938 ↑ 1.1 80,225 3 / 3

Subquery Scan on stmt_0 (cost=95,457.53..97,946.96 rows=89,544 width=44) (actual time=14,070.933..14,276.938 rows=80,225 loops=3)

9. 99.481 14,210.535 ↑ 1.1 80,225 3 / 3

GroupAggregate (cost=95,457.53..97,051.52 rows=89,544 width=44) (actual time=14,068.302..14,210.535 rows=80,225 loops=3)

  • Group Key: tmp_individuals_aggregations.super_individual_id
10. 237.582 14,111.054 ↓ 1.1 98,822 3 / 3

Sort (cost=95,457.53..95,690.38 rows=93,140 width=12) (actual time=14,061.829..14,111.054 rows=98,822 loops=3)

  • Sort Key: tmp_individuals_aggregations.super_individual_id
  • Sort Method: external merge Disk: 2528kB
  • Worker 0: Sort Method: external merge Disk: 2528kB
  • Worker 1: Sort Method: external merge Disk: 2528kB
11. 13,834.126 13,873.472 ↓ 1.1 98,822 3 / 3

Bitmap Heap Scan on tmp_individuals_aggregations (cost=1,746.27..87,770.16 rows=93,140 width=12) (actual time=50.109..13,873.472 rows=98,822 loops=3)

  • Recheck Cond: (super_committee_id = 2054)
  • Filter: (super_individual_id IS NOT NULL)
  • Heap Blocks: exact=34121
12. 39.346 39.346 ↓ 1.1 98,822 3 / 3

Bitmap Index Scan on tmp_individuals_aggregations_super_committee_id_idx (cost=0.00..1,722.98 rows=93,140 width=0) (actual time=39.345..39.346 rows=98,822 loops=3)

  • Index Cond: (super_committee_id = 2054)
13. 58.610 17,727.461 ↑ 1.3 79,620 3 / 3

GroupAggregate (cost=97,207.51..98,730.88 rows=100,051 width=44) (actual time=17,641.338..17,727.461 rows=79,620 loops=3)

  • Group Key: tmp_individuals_aggregations_1.super_individual_id
14. 176.506 17,668.851 ↑ 1.1 96,003 3 / 3

Sort (cost=97,207.51..97,468.94 rows=104,571 width=4) (actual time=17,637.762..17,668.851 rows=96,003 loops=3)

  • Sort Key: tmp_individuals_aggregations_1.super_individual_id
  • Sort Method: external merge Disk: 1320kB
  • Worker 0: Sort Method: external merge Disk: 1320kB
  • Worker 1: Sort Method: external merge Disk: 1320kB
15. 17,325.346 17,492.345 ↑ 1.1 96,003 3 / 3

Bitmap Heap Scan on tmp_individuals_aggregations tmp_individuals_aggregations_1 (cost=1,958.86..88,489.36 rows=104,571 width=4) (actual time=178.196..17,492.345 rows=96,003 loops=3)

  • Recheck Cond: (super_committee_id = 1828)
  • Heap Blocks: exact=32806
16. 166.999 166.999 ↑ 1.1 96,003 3 / 3

Bitmap Index Scan on tmp_individuals_aggregations_super_committee_id_idx (cost=0.00..1,932.72 rows=104,571 width=0) (actual time=166.999..166.999 rows=96,003 loops=3)

  • Index Cond: (super_committee_id = 1828)
17. 195.090 12,706.266 ↑ 1.1 344,698 1

Hash (cost=208,483.68..208,483.68 rows=381,529 width=44) (actual time=12,706.265..12,706.266 rows=344,698 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 1521kB
18. 195.815 12,511.176 ↑ 1.1 344,698 1

Subquery Scan on stmt_1 (cost=151,086.96..208,483.68 rows=381,529 width=44) (actual time=11,654.823..12,511.176 rows=344,698 loops=1)

19. 258.162 12,315.361 ↑ 1.1 344,698 1

Finalize GroupAggregate (cost=151,086.96..204,668.39 rows=381,529 width=44) (actual time=11,654.819..12,315.361 rows=344,698 loops=1)

  • Group Key: tmp_individuals_aggregations_2.super_individual_id
20. 318.553 12,057.199 ↑ 1.1 345,212 1

Gather Merge (cost=151,086.96..198,926.79 rows=385,262 width=12) (actual time=11,654.409..12,057.199 rows=345,212 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
21. 84.360 11,738.646 ↑ 1.7 115,071 3 / 3

Partial GroupAggregate (cost=150,086.93..153,457.98 rows=192,631 width=12) (actual time=11,612.686..11,738.646 rows=115,071 loops=3)

  • Group Key: tmp_individuals_aggregations_2.super_individual_id
22. 220.919 11,654.286 ↑ 1.3 147,510 3 / 3

Sort (cost=150,086.93..150,568.51 rows=192,631 width=12) (actual time=11,612.256..11,654.286 rows=147,510 loops=3)

  • Sort Key: tmp_individuals_aggregations_2.super_individual_id
  • Sort Method: external merge Disk: 3544kB
  • Worker 0: Sort Method: external merge Disk: 3896kB
  • Worker 1: Sort Method: external merge Disk: 3856kB
23. 11,357.660 11,433.367 ↑ 1.3 147,510 3 / 3

Parallel Bitmap Heap Scan on tmp_individuals_aggregations tmp_individuals_aggregations_2 (cost=8,655.37..129,884.79 rows=192,631 width=12) (actual time=201.356..11,433.367 rows=147,510 loops=3)

  • Recheck Cond: (super_committee_id = 1633)
  • Filter: (super_individual_id IS NOT NULL)
  • Heap Blocks: exact=15151
24. 75.707 75.707 ↑ 1.0 442,530 1 / 3

Bitmap Index Scan on tmp_individuals_aggregations_super_committee_id_idx (cost=0.00..8,539.79 rows=462,314 width=0) (actual time=227.121..227.121 rows=442,530 loops=1)

  • Index Cond: (super_committee_id = 1633)
Planning time : 0.497 ms
Execution time : 109,650.350 ms