explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yRCF

Settings
# exclusive inclusive rows x rows loops node
1. 270.008 3,766.925 ↓ 883.0 883 1

GroupAggregate (cost=69.35..69.38 rows=1 width=44) (actual time=3,442.036..3,766.925 rows=883 loops=1)

  • Group Key: gd.cid, gd.property_id, gat.gl_account_id
2. 412.022 3,496.917 ↓ 552,328.0 552,328 1

Sort (cost=69.35..69.35 rows=1 width=25) (actual time=3,442.001..3,496.917 rows=552,328 loops=1)

  • Sort Key: gd.property_id, gat.gl_account_id
  • Sort Method: quicksort Memory: 67727kB
3. 180.819 3,084.895 ↓ 552,328.0 552,328 1

Nested Loop (cost=1.29..69.34 rows=1 width=25) (actual time=0.078..3,084.895 rows=552,328 loops=1)

4. 128.531 666.992 ↓ 111,854.2 559,271 1

Nested Loop (cost=0.85..60.15 rows=5 width=29) (actual time=0.062..666.992 rows=559,271 loops=1)

5. 0.609 4.361 ↓ 763.0 763 1

Nested Loop (cost=0.29..36.79 rows=1 width=12) (actual time=0.030..4.361 rows=763 loops=1)

6. 0.700 0.700 ↓ 190.8 763 1

Seq Scan on gat_temp gat (cost=0.00..27.54 rows=4 width=12) (actual time=0.016..0.700 rows=763 loops=1)

  • Filter: (cid = 235)
7. 3.052 3.052 ↑ 1.0 1 763

Index Scan using idx_gl_branches_id on gl_branches gb (cost=0.29..2.31 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=763)

  • Index Cond: (id = gat.gl_branch_id)
  • Filter: (cid = 235)
8. 534.100 534.100 ↓ 61.1 733 763

Index Scan using idx_gl_details_cid_property_id_accrual_gl_account_id on gl_details gd (cost=0.56..23.24 rows=12 width=25) (actual time=0.018..0.700 rows=733 loops=763)

  • Index Cond: ((cid = 235) AND (property_id = ANY ('{181499,174075,18462,19463,512312,171712,120793}'::integer[])) AND (accrual_gl_account_id = gat.gl_account_id))
  • Filter: (post_month < '2019-06-01'::date)
  • Rows Removed by Filter: 49
9. 2,237.084 2,237.084 ↑ 1.0 1 559,271

Index Scan using idx_gl_headers_id on gl_headers gh (cost=0.43..1.84 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=559,271)

  • Index Cond: (id = gd.gl_header_id)
  • Filter: ((NOT is_template) AND (cid = 235) AND (gl_book_id = 616) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
  • Rows Removed by Filter: 0