explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xedO

Settings
# exclusive inclusive rows x rows loops node
1. 0.104 4,619.391 ↓ 445.0 890 1

Append (cost=69.35..146.46 rows=2 width=44) (actual time=3,415.504..4,619.391 rows=890 loops=1)

2. 181.869 3,635.054 ↓ 883.0 883 1

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

  • Group Key: gd.cid, gd.property_id, gat.gl_account_id
3. 645.977 3,453.185 ↓ 552,328.0 552,328 1

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

  • Sort Key: gd.property_id, gat.gl_account_id
  • Sort Method: quicksort Memory: 67727kB
4. 512.811 2,807.208 ↓ 552,328.0 552,328 1

Nested Loop (cost=1.29..69.34 rows=1 width=25) (actual time=0.149..2,807.208 rows=552,328 loops=1)

5. 115.962 616.584 ↓ 111,854.2 559,271 1

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

6. 0.943 3.909 ↓ 763.0 763 1

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

7. 0.677 0.677 ↓ 190.8 763 1

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

  • Filter: (cid = 235)
8. 2.289 2.289 ↑ 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.003..0.003 rows=1 loops=763)

  • Index Cond: (id = gat.gl_branch_id)
  • Filter: (cid = 235)
9. 496.713 496.713 ↓ 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.014..0.651 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. 1,677.813 1,677.813 ↑ 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.003..0.003 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.024 984.233 ↓ 7.0 7 1

Nested Loop (cost=72.97..77.06 rows=1 width=44) (actual time=958.895..984.233 rows=7 loops=1)

12. 46.644 984.118 ↓ 7.0 7 1

GroupAggregate (cost=72.68..72.71 rows=1 width=40) (actual time=958.843..984.118 rows=7 loops=1)

  • Group Key: gd_1.cid, gd_1.property_id
13. 79.310 937.474 ↓ 188,803.0 188,803 1

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

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

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

15. 30.767 195.314 ↓ 189,304.0 189,304 1

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

16. 0.787 2.952 ↓ 405.0 405 1

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

17. 0.639 0.639 ↓ 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.053..0.639 rows=763 loops=1)

  • Index Cond: ((cid = 235) AND (gl_tree_id = 427))
18. 1.526 1.526 ↑ 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.002..0.002 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. 161.595 161.595 ↓ 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.015..0.399 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. 567.912 567.912 ↑ 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.003..0.003 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.091 0.091 ↑ 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.013..0.013 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[]))