explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mdKG

Settings
# exclusive inclusive rows x rows loops node
1. 19,258.999 174,391.272 ↑ 1.0 16 1

GroupAggregate (cost=1,001.41..545,172.81 rows=16 width=76) (actual time=2,474.801..174,391.272 rows=16 loops=1)

  • Group Key: cn.id
  • Functions: 32
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 11.916 ms, Inlining 153.189 ms, Optimization 495.670 ms, Emission 267.014 ms, Total 927.789 ms
2. 2,763.412 155,132.273 ↓ 10.3 5,495,086 1

Merge Left Join (cost=1,001.41..534,473.47 rows=534,959 width=92) (actual time=969.169..155,132.273 rows=5,495,086 loops=1)

  • Merge Cond: (cn.id = o.complex_name_id)
3. 0.223 0.223 ↑ 1.0 16 1

Index Scan using complex_name_pkey on complex_name cn (cost=0.14..12.38 rows=16 width=60) (actual time=0.022..0.223 rows=16 loops=1)

4. 3,632.583 152,368.638 ↓ 10.3 5,495,085 1

Materialize (cost=1,001.28..527,774.06 rows=534,959 width=36) (actual time=455.628..152,368.638 rows=5,495,085 loops=1)

5. 77,142.039 148,736.055 ↓ 10.3 5,495,085 1

Gather Merge (cost=1,001.28..526,436.67 rows=534,959 width=36) (actual time=455.617..148,736.055 rows=5,495,085 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 1,783.754 71,594.016 ↓ 8.7 2,747,542 2 / 2

Nested Loop Left Join (cost=1.27..465,253.77 rows=314,682 width=36) (actual time=201.885..71,594.016 rows=2,747,542 loops=2)

7. 244.416 624.639 ↑ 1.2 13,020 2 / 2

Nested Loop Left Join (cost=0.71..72,375.01 rows=15,317 width=14) (actual time=201.828..624.639 rows=13,020 loops=2)

8. 28.696 28.696 ↑ 1.2 13,020 2 / 2

Parallel Index Scan using organization_complex_name_id_index on organization o (cost=0.29..4,929.88 rows=15,317 width=13) (actual time=0.048..28.696 rows=13,020 loops=2)

9. 351.526 351.526 ↑ 1.0 1 26,039 / 2

Index Only Scan using companies_pkey on companies c (cost=0.42..4.40 rows=1 width=10) (actual time=0.027..0.027 rows=1 loops=26,039)

  • Index Cond: (tin = o.tin)
  • Heap Fetches: 25,568
10. 69,185.623 69,185.623 ↑ 1.6 211 26,039 / 2

Index Scan using transactions_company_tin_index on transactions t (cost=0.56..22.37 rows=328 width=32) (actual time=0.066..5.314 rows=211 loops=26,039)

  • Index Cond: (company_tin = c.tin)
  • Filter: (active AND action)
  • Rows Removed by Filter: 51
Planning time : 2.475 ms
Execution time : 174,462.684 ms