explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YR2o

Settings
# exclusive inclusive rows x rows loops node
1. 50.522 187.646 ↓ 1.0 14,984 1

Finalize HashAggregate (cost=59,428.33..59,968.93 rows=14,416 width=140) (actual time=171.870..187.646 rows=14,984 loops=1)

  • Group Key: gd.cid, gd.property_id, gd.period_id, gd.post_month, gd.accrual_gl_account_id, gd.cash_gl_account_id, gh.gl_book_id, (COALESCE(gd.property_building_id, 0)), (COALESCE(gd.property_unit_id, 0)), (COALESCE(gd.gl_dimension_id, 0)), (COALESCE(gd.company_department_id, 0))
2. 13.641 137.124 ↓ 2.0 17,116 1

Gather (cost=57,901.93..59,067.93 rows=8,480 width=140) (actual time=114.387..137.124 rows=17,116 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 44.372 123.483 ↓ 1.0 8,558 2 / 2

Partial HashAggregate (cost=56,901.93..57,219.93 rows=8,480 width=140) (actual time=107.242..123.483 rows=8,558 loops=2)

  • Group Key: gd.cid, gd.property_id, gd.period_id, gd.post_month, gd.accrual_gl_account_id, gd.cash_gl_account_id, gh.gl_book_id, COALESCE(gd.property_building_id, 0), COALESCE(gd.property_unit_id, 0), COALESCE(gd.gl_dimension_id, 0), COALESCE(gd.company_department_id, 0)
4. 11.742 79.111 ↓ 3.1 26,364 2 / 2

Nested Loop (cost=1.00..56,562.73 rows=8,480 width=49) (actual time=0.087..79.111 rows=26,364 loops=2)

5. 14.642 14.642 ↓ 1.7 26,364 2 / 2

Parallel Index Scan using idx_gl_details_cid_property_id_post_month on gl_details gd (cost=0.56..23,882.40 rows=15,251 width=49) (actual time=0.033..14.642 rows=26,364 loops=2)

  • Index Cond: ((cid = 13576) AND (property_id = 347830) AND (post_month > '11/01/2019'::date))
6. 52.727 52.727 ↑ 1.0 1 52,727 / 2

Index Scan using idx_gl_headers_id on gl_headers gh (cost=0.43..2.14 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=52,727)

  • Index Cond: (id = gd.gl_header_id)
  • Filter: ((is_template IS FALSE) AND (cid = 13576) AND (gl_header_status_type_id = ANY ('{1,2,3}'::integer[])))
Planning time : 2.144 ms
Execution time : 189.424 ms