explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I9Ox

Settings
# exclusive inclusive rows x rows loops node
1. 0.194 5,569.942 ↓ 178.0 890 1

Append (cost=4,400.38..4,477.62 rows=5 width=44) (actual time=3,842.668..5,569.942 rows=890 loops=1)

2. 360.578 4,286.411 ↓ 220.8 883 1

GroupAggregate (cost=4,400.38..4,400.51 rows=4 width=44) (actual time=3,842.667..4,286.411 rows=883 loops=1)

  • Group Key: gd.cid, gd.property_id, gat.gl_account_id
3. 525.677 3,925.833 ↓ 138,082.0 552,328 1

Sort (cost=4,400.38..4,400.39 rows=4 width=25) (actual time=3,842.584..3,925.833 rows=552,328 loops=1)

  • Sort Key: gd.property_id, gat.gl_account_id
  • Sort Method: quicksort Memory: 67727kB
4. 346.580 3,400.156 ↓ 138,082.0 552,328 1

Nested Loop (cost=1.29..4,400.34 rows=4 width=25) (actual time=0.102..3,400.156 rows=552,328 loops=1)

5. 127.550 816.492 ↓ 620.7 559,271 1

Nested Loop (cost=0.85..2,744.58 rows=901 width=29) (actual time=0.084..816.492 rows=559,271 loops=1)

6. 1.361 5.294 ↓ 10.3 763 1

Nested Loop (cost=0.29..1,057.98 rows=74 width=12) (actual time=0.039..5.294 rows=763 loops=1)

7. 0.881 0.881 ↑ 1.0 763 1

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

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

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

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

Index Scan using idx_gl_details_cid_property_id_accrual_gl_account_id on gl_details gd (cost=0.56..22.67 rows=12 width=25) (actual time=0.018..0.896 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
10. 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
11. 0.036 1,283.337 ↓ 7.0 7 1

Nested Loop (cost=72.97..77.06 rows=1 width=44) (actual time=1,255.562..1,283.337 rows=7 loops=1)

12. 47.686 1,283.189 ↓ 7.0 7 1

GroupAggregate (cost=72.68..72.71 rows=1 width=40) (actual time=1,255.515..1,283.189 rows=7 loops=1)

  • Group Key: gd_1.cid, gd_1.property_id
13. 104.262 1,235.503 ↓ 188,803.0 188,803 1

Sort (cost=72.68..72.69 rows=1 width=13) (actual time=1,222.065..1,235.503 rows=188,803 loops=1)

  • Sort Key: gd_1.property_id
  • Sort Method: quicksort Memory: 15012kB
14. 119.913 1,131.241 ↓ 188,803.0 188,803 1

Nested Loop (cost=1.71..72.67 rows=1 width=13) (actual time=0.502..1,131.241 rows=188,803 loops=1)

15. 38.332 254.112 ↓ 189,304.0 189,304 1

Nested Loop (cost=1.28..70.79 rows=1 width=17) (actual time=0.435..254.112 rows=189,304 loops=1)

16. 0.687 5.585 ↓ 405.0 405 1

Nested Loop (cost=0.72..47.44 rows=1 width=8) (actual time=0.183..5.585 rows=405 loops=1)

17. 1.846 1.846 ↓ 54.5 763 1

Index Scan using uk_gl_account_trees_gl_account_id on gl_account_trees gat_1 (cost=0.43..15.03 rows=14 width=12) (actual time=0.079..1.846 rows=763 loops=1)

  • Index Cond: ((cid = 235) AND (gl_tree_id = 427))
18. 3.052 3.052 ↑ 1.0 1 763

Index Scan using idx_gl_branches_id on gl_branches gb_1 (cost=0.29..2.32 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=763)

  • Index Cond: (id = gat_1.gl_branch_id)
  • Filter: ((gl_group_type_id = ANY ('{4,5}'::integer[])) AND (cid = 235))
  • Rows Removed by Filter: 0
19. 210.195 210.195 ↓ 42.5 467 405

Index Scan using idx_gl_details_cid_property_id_accrual_gl_account_id on gl_details gd_1 (cost=0.56..23.24 rows=11 width=21) (actual time=0.024..0.519 rows=467 loops=405)

  • Index Cond: ((cid = 235) AND (property_id = ANY ('{181499,174075,18462,19463,512312,171712,120793}'::integer[])) AND (accrual_gl_account_id = gat_1.gl_account_id))
  • Filter: (post_month < '2019-01-01'::date)
  • Rows Removed by Filter: 88
20. 757.216 757.216 ↑ 1.0 1 189,304

Index Scan using idx_gl_headers_id on gl_headers gh_1 (cost=0.43..1.88 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=189,304)

  • Index Cond: (id = gd_1.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
21. 0.112 0.112 ↑ 1.0 1 7

Index Scan using idx_property_gl_settings_cid_property_id_activate_asset_posting on property_gl_settings pgs (cost=0.29..2.31 rows=1 width=12) (actual time=0.016..0.016 rows=1 loops=7)

  • Index Cond: ((cid = 235) AND (property_id = gd_1.property_id))
  • Filter: (property_id = ANY ('{181499,174075,18462,19463,512312,171712,120793}'::integer[]))