explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NOoM

Settings
# exclusive inclusive rows x rows loops node
1. 5.490 226.752 ↓ 315.5 1,262 1

GroupAggregate (cost=6,362.31..6,362.85 rows=4 width=1,498) (actual time=221.065..226.752 rows=1,262 loops=1)

  • Group Key: outer_details.property_name, outer_details.account_number, outer_details.is_beginning_balance, outer_details.gl_account, outer_details.post_month, outer_details.post_date, outer_details.transaction_date, outer_details.gl_detail_id, outer_details.property_id, outer_details.lookup_code, outer_details.grouping_gl_account_id, outer_details.account_name, outer_details.gl_transaction_type_id, outer_details.transaction_type, outer_details.gh_header_id, outer_details.header_number, outer_details.reference_id, outer_details.reference, outer_details.transaction_id, outer_details.memo, outer_details.ap_payment_id, outer_details.ar_payment_id, outer_details.art_id, outer_details.vendor_id, outer_details.resident, outer_details.bldg_unit, outer_details.display_number, outer_details.lease_id, outer_details.occupancy_type_id, outer_details.customer_id, outer_details.beginning_balance, outer_details.hide_zero_beginning_balance_for_no_activities, outer_details.min_debit, outer_details.min_credit, outer_details.min_beginning_balance, outer_details.max_debit, outer_details.max_credit, outer_details.max_beginning_balance
2. 15.494 221.262 ↓ 321.5 1,286 1

Sort (cost=6,362.31..6,362.32 rows=4 width=1,466) (actual time=221.037..221.262 rows=1,286 loops=1)

  • Sort Key: outer_details.property_name, outer_details.account_number, outer_details.is_beginning_balance DESC, outer_details.gl_account, outer_details.post_month, outer_details.post_date, outer_details.transaction_date, outer_details.gl_detail_id, outer_details.property_id, outer_details.lookup_code, outer_details.grouping_gl_account_id, outer_details.account_name, outer_details.gl_transaction_type_id, outer_details.transaction_type, outer_details.gh_header_id, outer_details.header_number, outer_details.reference_id, outer_details.reference, outer_details.transaction_id, outer_details.memo, outer_details.ap_payment_id, outer_details.ar_payment_id, outer_details.art_id, outer_details.vendor_id, outer_details.resident, outer_details.bldg_unit, outer_details.display_number, outer_details.lease_id, outer_details.occupancy_type_id, outer_details.customer_id, outer_details.beginning_balance, outer_details.hide_zero_beginning_balance_for_no_activities, outer_details.min_debit, outer_details.min_credit, outer_details.min_beginning_balance, outer_details.max_debit, outer_details.max_credit, outer_details.max_beginning_balance
  • Sort Method: quicksort Memory: 672kB
3. 0.811 205.768 ↓ 321.5 1,286 1

Subquery Scan on outer_details (cost=6,362.02..6,362.27 rows=4 width=1,466) (actual time=200.802..205.768 rows=1,286 loops=1)

  • Filter: (outer_details.hide_zero_beginning_balance_for_no_activities <> 1)
  • Rows Removed by Filter: 35
4. 4.207 204.957 ↓ 264.2 1,321 1

WindowAgg (cost=6,362.02..6,362.21 rows=5 width=1,498) (actual time=200.793..204.957 rows=1,321 loops=1)

5. 2.783 200.750 ↓ 264.2 1,321 1

Sort (cost=6,362.02..6,362.04 rows=5 width=1,274) (actual time=200.528..200.750 rows=1,321 loops=1)

  • Sort Key: details.property_id, details.gl_account
  • Sort Method: quicksort Memory: 675kB
6. 2.192 197.967 ↓ 264.2 1,321 1

WindowAgg (cost=6,361.87..6,361.97 rows=5 width=1,274) (actual time=195.556..197.967 rows=1,321 loops=1)

7. 3.202 195.775 ↓ 264.2 1,321 1

Sort (cost=6,361.87..6,361.88 rows=5 width=1,266) (actual time=195.537..195.775 rows=1,321 loops=1)

  • Sort Key: details.property_id, details.grouping_gl_account_id
  • Sort Method: quicksort Memory: 672kB
8. 0.797 192.573 ↓ 264.2 1,321 1

Subquery Scan on details (cost=295.33..6,361.81 rows=5 width=1,266) (actual time=14.719..192.573 rows=1,321 loops=1)

9. 0.441 191.776 ↓ 264.2 1,321 1

Append (cost=295.33..6,361.76 rows=5 width=1,298) (actual time=14.718..191.776 rows=1,321 loops=1)

10. 1.032 187.398 ↓ 284.5 1,138 1

Result (cost=295.33..6,339.81 rows=4 width=1,284) (actual time=14.717..187.398 rows=1,138 loops=1)

11. 0.423 186.366 ↓ 284.5 1,138 1

Append (cost=295.33..6,339.76 rows=4 width=1,256) (actual time=14.715..186.366 rows=1,138 loops=1)

12. 90.487 170.403 ↓ 335.3 1,006 1

Nested Loop Semi Join (cost=295.33..4,575.03 rows=3 width=443) (actual time=14.715..170.403 rows=1,006 loops=1)

  • Join Filter: (gd.accrual_gl_account_id = gat_temp.gl_account_id)
13. 1.022 77.904 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.54 rows=3 width=1,644) (actual time=14.288..77.904 rows=1,006 loops=1)

  • Join Filter: false
14. 1.020 76.882 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.51 rows=3 width=1,617) (actual time=14.286..76.882 rows=1,006 loops=1)

  • Join Filter: false
15. 1.007 75.862 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.48 rows=3 width=1,607) (actual time=14.285..75.862 rows=1,006 loops=1)

  • Join Filter: false
16. 1.016 74.855 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.45 rows=3 width=1,597) (actual time=14.283..74.855 rows=1,006 loops=1)

  • Join Filter: false
17. 0.991 73.839 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.42 rows=3 width=1,562) (actual time=14.281..73.839 rows=1,006 loops=1)

  • Join Filter: false
18. 1.001 72.848 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.39 rows=3 width=1,554) (actual time=14.279..72.848 rows=1,006 loops=1)

  • Join Filter: false
19. 0.990 71.847 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.36 rows=3 width=1,554) (actual time=14.278..71.847 rows=1,006 loops=1)

  • Join Filter: false
20. 0.977 70.857 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.33 rows=3 width=1,550) (actual time=14.276..70.857 rows=1,006 loops=1)

  • Join Filter: false
21. 0.987 69.880 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.30 rows=3 width=1,517) (actual time=14.274..69.880 rows=1,006 loops=1)

  • Join Filter: false
22. 0.965 68.893 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.27 rows=3 width=1,314) (actual time=14.272..68.893 rows=1,006 loops=1)

  • Join Filter: false
23. 0.967 67.928 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.24 rows=3 width=1,145) (actual time=14.271..67.928 rows=1,006 loops=1)

  • Join Filter: false
24. 0.961 66.961 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.21 rows=3 width=1,121) (actual time=14.269..66.961 rows=1,006 loops=1)

  • Join Filter: false
25. 1.064 66.000 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.18 rows=3 width=1,097) (actual time=14.268..66.000 rows=1,006 loops=1)

  • Join Filter: false
26. 0.955 64.936 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=295.05..4,563.15 rows=3 width=1,093) (actual time=14.266..64.936 rows=1,006 loops=1)

27. 2.563 60.963 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.63..4,561.45 rows=3 width=1,041) (actual time=14.249..60.963 rows=1,006 loops=1)

28. 1.791 54.376 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.21..4,537.36 rows=3 width=992) (actual time=14.225..54.376 rows=1,006 loops=1)

29. 2.557 50.573 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=293.92..4,536.38 rows=3 width=706) (actual time=14.208..50.573 rows=1,006 loops=1)

  • Join Filter: (gh.cid = art1.cid)
30. 4.040 43.992 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=293.49..4,528.10 rows=3 width=502) (actual time=14.193..43.992 rows=1,006 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{7,8,9,17}'::integer[]))
  • Rows Removed by Join Filter: 382
31. 1.886 30.898 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=56.85..3,806.07 rows=3 width=486) (actual time=14.165..30.898 rows=1,006 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{13,14,18,23,24}'::integer[]))
32. 8.513 23.982 ↓ 335.3 1,006 1

Nested Loop (cost=56.41..3,793.52 rows=3 width=478) (actual time=14.145..23.982 rows=1,006 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = gtty.id)
  • Rows Removed by Join Filter: 26156
33. 0.052 0.052 ↑ 1.0 27 1

Index Scan using pk_gl_transaction_types on gl_transaction_types gtty (cost=0.14..20.65 rows=27 width=24) (actual time=0.017..0.052 rows=27 loops=1)

34. 4.897 15.417 ↓ 335.3 1,006 27

Materialize (cost=56.28..3,771.66 rows=3 width=454) (actual time=0.054..0.571 rows=1,006 loops=27)

35. 0.521 10.520 ↓ 335.3 1,006 1

Nested Loop (cost=56.28..3,771.65 rows=3 width=454) (actual time=1.430..10.520 rows=1,006 loops=1)

36. 0.024 0.024 ↑ 1.0 1 1

Index Scan using idx_properties_id on properties p (cost=0.28..8.30 rows=1 width=33) (actual time=0.023..0.024 rows=1 loops=1)

  • Index Cond: (id = 2458)
  • Filter: (cid = 224)
37. 1.494 9.975 ↓ 335.3 1,006 1

Nested Loop (cost=56.00..3,763.32 rows=3 width=429) (actual time=1.404..9.975 rows=1,006 loops=1)

38. 1.148 4.457 ↓ 3.6 1,006 1

Hash Join (cost=55.56..1,380.67 rows=282 width=333) (actual time=1.382..4.457 rows=1,006 loops=1)

  • Hash Cond: (gd.accrual_gl_account_id = gat.gl_account_id)
39. 1.988 1.988 ↓ 3.4 1,016 1

Index Scan using idx_gl_details_cid_property_id_post_month_lease_id_reference_id on gl_details gd (cost=0.56..1,321.73 rows=299 width=73) (actual time=0.040..1.988 rows=1,016 loops=1)

  • Index Cond: ((cid = 224) AND (property_id = 2458) AND (post_month >= '2019-06-01'::date) AND (post_month <= '2019-06-01'::date) AND (gl_transaction_type_id = ANY ('{13,14,18,23,24,7,8,9,17}'::integer[])))
40. 0.544 1.321 ↑ 1.0 1,160 1

Hash (cost=40.50..40.50 rows=1,160 width=264) (actual time=1.321..1.321 rows=1,160 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 114kB
41. 0.777 0.777 ↑ 1.0 1,160 1

Seq Scan on gat_temp gat (cost=0.00..40.50 rows=1,160 width=264) (actual time=0.010..0.777 rows=1,160 loops=1)

  • Filter: (cid = 224)
42. 4.024 4.024 ↑ 1.0 1 1,006

Index Scan using idx_gl_headers_id on gl_headers gh (cost=0.43..8.45 rows=1 width=100) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: (id = gd.gl_header_id)
  • Filter: ((NOT is_template) AND (cid = 224) AND (gl_book_id = 132) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
43. 5.030 5.030 ↓ 0.0 0 1,006

Index Scan using pk_ar_allocations on ar_allocations ara (cost=0.43..4.17 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=1,006)

  • Index Cond: ((cid = gh.cid) AND (cid = 224) AND (id = gh.reference_id))
44. 2.012 9.054 ↑ 1.0 1 1,006

Bitmap Heap Scan on ar_transactions art (cost=236.64..240.66 rows=1 width=20) (actual time=0.009..0.009 rows=1 loops=1,006)

  • Recheck Cond: (((cid = 224) AND (id = gh.reference_id)) OR ((cid = 224) AND (id = ara.credit_ar_transaction_id)))
  • Filter: (gh.cid = cid)
  • Heap Blocks: exact=1006
45. 2.012 7.042 ↓ 0.0 0 1,006

BitmapOr (cost=236.64..236.64 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=1,006)

46. 4.024 4.024 ↑ 1.0 1 1,006

Bitmap Index Scan on pk_ar_transactions (cost=0.00..1.37 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: ((cid = 224) AND (id = gh.reference_id))
47. 1.006 1.006 ↓ 0.0 0 1,006

Bitmap Index Scan on pk_ar_transactions (cost=0.00..0.67 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=1,006)

  • Index Cond: ((cid = 224) AND (id = ara.credit_ar_transaction_id))
48. 4.024 4.024 ↑ 1.0 1 1,006

Index Scan using pk_ar_transactions on ar_transactions art1 (cost=0.43..2.75 rows=1 width=212) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: ((cid = 224) AND (id = COALESCE(ara.charge_ar_transaction_id, art.id)))
49. 2.012 2.012 ↑ 1.0 1 1,006

Index Scan using idx_ar_codes on ar_codes ac (cost=0.29..0.31 rows=1 width=302) (actual time=0.002..0.002 rows=1 loops=1,006)

  • Index Cond: (id = art.ar_code_id)
  • Filter: ((cid = 224) AND (cid = art.cid))
50. 4.024 4.024 ↑ 1.0 1 1,006

Index Scan using pk_cached_leases on cached_leases cl (cost=0.42..8.03 rows=1 width=61) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: ((cid = gd.cid) AND (cid = 224) AND (id = gd.lease_id))
51. 3.018 3.018 ↓ 0.0 0 1,006

Index Scan using idx_ar_deposits_id on ar_deposits ard (cost=0.42..0.56 rows=1 width=68) (actual time=0.003..0.003 rows=0 loops=1,006)

  • Index Cond: (gh.reference_id = id)
  • Filter: ((cid = 224) AND (gh.cid = cid) AND (gh.gl_transaction_type_id = gl_transaction_type_id))
52. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=4) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
53. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=24) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
54. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=32) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
55. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=169) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
56. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=203) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
57. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=33) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
58. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=4) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
59. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
60. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=8) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
61. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=35) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
62. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=10) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
63. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=10) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
64. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=27) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
65. 2.012 2.012 ↑ 1.0 1 1,006

Index Only Scan using idx_gat_temp_gl_account on gat_temp (cost=0.28..0.41 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,006)

  • Index Cond: (gl_account_id = gat.gl_account_id)
  • Heap Fetches: 1006
66. 4.441 15.540 ↓ 132.0 132 1

Nested Loop Semi Join (cost=20.21..1,764.69 rows=1 width=443) (actual time=0.818..15.540 rows=132 loops=1)

  • Join Filter: (gd_1.accrual_gl_account_id = gat_temp_1.gl_account_id)
67. 0.240 10.835 ↓ 132.0 132 1

Nested Loop Left Join (cost=19.93..1,760.86 rows=1 width=1,644) (actual time=0.678..10.835 rows=132 loops=1)

68. 0.181 10.199 ↓ 132.0 132 1

Nested Loop Left Join (cost=19.64..1,760.52 rows=1 width=1,633) (actual time=0.644..10.199 rows=132 loops=1)

69. 0.262 9.886 ↓ 132.0 132 1

Nested Loop Left Join (cost=19.22..1,759.89 rows=1 width=1,627) (actual time=0.618..9.886 rows=132 loops=1)

70. 0.219 9.360 ↓ 132.0 132 1

Nested Loop Left Join (cost=18.80..1,759.26 rows=1 width=1,617) (actual time=0.591..9.360 rows=132 loops=1)

71. 0.237 9.141 ↓ 132.0 132 1

Nested Loop Left Join (cost=18.37..1,758.63 rows=1 width=1,590) (actual time=0.564..9.141 rows=132 loops=1)

72. 0.222 8.904 ↓ 132.0 132 1

Nested Loop Left Join (cost=17.95..1,757.78 rows=1 width=1,582) (actual time=0.543..8.904 rows=132 loops=1)

73. 0.169 8.154 ↓ 132.0 132 1

Nested Loop Left Join (cost=17.52..1,757.27 rows=1 width=1,586) (actual time=0.506..8.154 rows=132 loops=1)

74. 0.238 7.853 ↓ 132.0 132 1

Nested Loop Left Join (cost=17.10..1,756.30 rows=1 width=1,582) (actual time=0.486..7.853 rows=132 loops=1)

75. 0.240 7.219 ↓ 132.0 132 1

Nested Loop Left Join (cost=16.67..1,755.63 rows=1 width=1,553) (actual time=0.461..7.219 rows=132 loops=1)

76. 0.287 6.979 ↓ 132.0 132 1

Nested Loop Left Join (cost=16.39..1,751.68 rows=1 width=1,370) (actual time=0.439..6.979 rows=132 loops=1)

77. 0.257 6.692 ↓ 132.0 132 1

Nested Loop Left Join (cost=16.10..1,743.64 rows=1 width=1,213) (actual time=0.411..6.692 rows=132 loops=1)

78. 0.255 5.907 ↓ 132.0 132 1

Nested Loop Left Join (cost=15.67..1,735.18 rows=1 width=1,173) (actual time=0.372..5.907 rows=132 loops=1)

79. 0.238 5.256 ↓ 132.0 132 1

Nested Loop Left Join (cost=15.24..1,733.22 rows=1 width=1,129) (actual time=0.353..5.256 rows=132 loops=1)

  • Join Filter: (gh_1.gl_transaction_type_id = ANY ('{4,5}'::integer[]))
80. 0.131 4.358 ↓ 132.0 132 1

Nested Loop Left Join (cost=14.82..1,732.10 rows=1 width=1,117) (actual time=0.323..4.358 rows=132 loops=1)

  • Join Filter: false
81. 0.134 4.227 ↓ 132.0 132 1

Nested Loop Left Join (cost=14.82..1,732.09 rows=1 width=1,061) (actual time=0.314..4.227 rows=132 loops=1)

  • Join Filter: false
82. 0.126 4.093 ↓ 132.0 132 1

Nested Loop Left Join (cost=14.82..1,732.08 rows=1 width=1,008) (actual time=0.306..4.093 rows=132 loops=1)

  • Join Filter: false
83. 0.125 3.967 ↓ 132.0 132 1

Nested Loop Left Join (cost=14.82..1,732.07 rows=1 width=714) (actual time=0.298..3.967 rows=132 loops=1)

  • Join Filter: false
84. 0.127 3.842 ↓ 132.0 132 1

Nested Loop Left Join (cost=14.82..1,732.06 rows=1 width=510) (actual time=0.291..3.842 rows=132 loops=1)

  • Join Filter: false
85. 0.139 3.715 ↓ 132.0 132 1

Nested Loop Left Join (cost=14.82..1,732.05 rows=1 width=498) (actual time=0.284..3.715 rows=132 loops=1)

  • Join Filter: false
86. 0.221 3.576 ↓ 132.0 132 1

Nested Loop (cost=14.82..1,732.04 rows=1 width=494) (actual time=0.276..3.576 rows=132 loops=1)

87. 0.221 2.959 ↓ 132.0 132 1

Nested Loop (cost=14.54..1,728.94 rows=1 width=234) (actual time=0.250..2.959 rows=132 loops=1)

88. 0.158 2.474 ↓ 132.0 132 1

Nested Loop (cost=14.40..1,728.78 rows=1 width=210) (actual time=0.230..2.474 rows=132 loops=1)

89. 0.223 1.788 ↓ 132.0 132 1

Nested Loop (cost=14.12..1,720.48 rows=1 width=185) (actual time=0.204..1.788 rows=132 loops=1)

90. 0.627 0.773 ↓ 3.1 132 1

Bitmap Heap Scan on gl_details gd_1 (cost=13.69..1,356.59 rows=43 width=89) (actual time=0.170..0.773 rows=132 loops=1)

  • Recheck Cond: ((cid = 224) AND (property_id = 2458) AND (post_month >= '2019-06-01'::date) AND (post_month <= '2019-06-01'::date))
  • Filter: (gl_transaction_type_id <> ALL ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 1016
  • Heap Blocks: exact=126
91. 0.146 0.146 ↓ 3.4 1,148 1

Bitmap Index Scan on idx_gl_details_cid_property_id_post_month (cost=0.00..13.68 rows=341 width=0) (actual time=0.146..0.146 rows=1,148 loops=1)

  • Index Cond: ((cid = 224) AND (property_id = 2458) AND (post_month >= '2019-06-01'::date) AND (post_month <= '2019-06-01'::date))
92. 0.792 0.792 ↑ 1.0 1 132

Index Scan using idx_gl_headers_id on gl_headers gh_1 (cost=0.43..8.46 rows=1 width=100) (actual time=0.006..0.006 rows=1 loops=132)

  • Index Cond: (id = gd_1.gl_header_id)
  • Filter: ((NOT is_template) AND (cid = 224) AND (gl_book_id = 132) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
93. 0.528 0.528 ↑ 1.0 1 132

Index Scan using idx_properties_id on properties p_1 (cost=0.28..8.30 rows=1 width=33) (actual time=0.003..0.004 rows=1 loops=132)

  • Index Cond: (id = 2458)
  • Filter: (cid = 224)
94. 0.264 0.264 ↑ 1.0 1 132

Index Scan using pk_gl_transaction_types on gl_transaction_types gtty_1 (cost=0.14..0.16 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=132)

  • Index Cond: (id = gh_1.gl_transaction_type_id)
95. 0.396 0.396 ↑ 1.0 1 132

Index Scan using idx_gat_temp_gl_account on gat_temp gat_1 (cost=0.28..3.09 rows=1 width=264) (actual time=0.002..0.003 rows=1 loops=132)

  • Index Cond: (gl_account_id = gd_1.accrual_gl_account_id)
  • Filter: (cid = 224)
96. 0.000 0.000 ↓ 0.0 0 132

Result (cost=0.00..0.00 rows=0 width=4) (actual time=0.000..0.000 rows=0 loops=132)

  • One-Time Filter: false
97. 0.000 0.000 ↓ 0.0 0 132

Result (cost=0.00..0.00 rows=0 width=12) (actual time=0.000..0.000 rows=0 loops=132)

  • One-Time Filter: false
98. 0.000 0.000 ↓ 0.0 0 132

Result (cost=0.00..0.00 rows=0 width=204) (actual time=0.000..0.000 rows=0 loops=132)

  • One-Time Filter: false
99. 0.000 0.000 ↓ 0.0 0 132

Result (cost=0.00..0.00 rows=0 width=294) (actual time=0.000..0.000 rows=0 loops=132)

  • One-Time Filter: false
100. 0.000 0.000 ↓ 0.0 0 132

Result (cost=0.00..0.00 rows=0 width=53) (actual time=0.000..0.000 rows=0 loops=132)

  • One-Time Filter: false
101. 0.000 0.000 ↓ 0.0 0 132

Result (cost=0.00..0.00 rows=0 width=56) (actual time=0.000..0.000 rows=0 loops=132)

  • One-Time Filter: false
102. 0.660 0.660 ↑ 1.0 1 132

Index Scan using pk_ap_allocations on ap_allocations aa (cost=0.42..1.11 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=132)

  • Index Cond: ((gh_1.cid = cid) AND (cid = 224) AND (gh_1.reference_id = id))
  • Filter: (gl_transaction_type_id = gh_1.gl_transaction_type_id)
103. 0.396 0.396 ↑ 1.0 1 132

Index Scan using idx_ap_details on ap_details ad (cost=0.43..1.95 rows=1 width=52) (actual time=0.003..0.003 rows=1 loops=132)

  • Index Cond: (aa.credit_ap_detail_id = id)
  • Filter: ((cid = 224) AND (aa.cid = cid))
104. 0.528 0.528 ↑ 1.0 1 132

Index Scan using idx_ap_details on ap_details ad1 (cost=0.43..8.45 rows=1 width=52) (actual time=0.004..0.004 rows=1 loops=132)

  • Index Cond: (id = COALESCE(gd_1.ap_detail_id, aa.charge_ap_detail_id))
  • Filter: (cid = COALESCE(gd_1.cid, aa.cid))
105. 0.000 0.000 ↓ 0.0 0 132

Index Scan using pk_property_units on property_units pu (cost=0.29..8.04 rows=1 width=177) (actual time=0.000..0.000 rows=0 loops=132)

  • Index Cond: ((gd_1.cid = cid) AND (cid = 224) AND (id = CASE WHEN (gd_1.gl_transaction_type_id = 1) THEN gd_1.property_unit_id ELSE COALESCE(ad1.property_unit_id, ad.property_unit_id) END))
106. 0.000 0.000 ↓ 0.0 0 132

Index Scan using idx_property_buildings_id on property_buildings pb (cost=0.28..3.93 rows=1 width=211) (actual time=0.000..0.000 rows=0 loops=132)

  • Index Cond: (id = CASE WHEN (gd_1.gl_transaction_type_id = 1) THEN gd_1.property_building_id ELSE COALESCE(ad1.property_building_id, ad.property_building_id, gd_1.property_building_id) END)
  • Filter: ((cid = 224) AND (cid = gd_1.cid))
107. 0.396 0.396 ↑ 1.0 1 132

Index Scan using idx_ap_headers on ap_headers ah (cost=0.42..0.66 rows=1 width=49) (actual time=0.003..0.003 rows=1 loops=132)

  • Index Cond: (ad.ap_header_id = id)
  • Filter: ((cid = 224) AND (ad.cid = cid) AND (ad.gl_transaction_type_id = gl_transaction_type_id) AND (ad.post_month = post_month))
108. 0.132 0.132 ↓ 0.0 0 132

Index Scan using idx_ap_headers on ap_headers ah1 (cost=0.42..0.96 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=132)

  • Index Cond: (id = aa.lump_ap_header_id)
  • Filter: ((cid = 224) AND (cid = aa.cid))
109. 0.528 0.528 ↑ 1.0 1 132

Index Scan using idx_ap_headers on ap_headers ah2 (cost=0.42..0.50 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=132)

  • Index Cond: (ad1.ap_header_id = id)
  • Filter: ((ad1.cid = cid) AND (ad1.gl_transaction_type_id = gl_transaction_type_id) AND (ad1.post_month = post_month))
110. 0.000 0.000 ↓ 0.0 0 132

Index Scan using idx_lease_customers_id on lease_customers lc (cost=0.42..0.84 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=132)

  • Index Cond: (id = COALESCE(ah2.lease_customer_id, ah.lease_customer_id))
  • Filter: (cid = COALESCE(ah2.cid, ah.cid))
111. 0.000 0.000 ↓ 0.0 0 132

Index Scan using idx_customers_id on customers cust (cost=0.42..0.62 rows=1 width=39) (actual time=0.000..0.000 rows=0 loops=132)

  • Index Cond: (id = lc.customer_id)
  • Filter: (cid = lc.cid)
112. 0.264 0.264 ↑ 1.0 1 132

Index Scan using idx_ap_payments_id on ap_payments ap_ref (cost=0.42..0.62 rows=1 width=18) (actual time=0.002..0.002 rows=1 loops=132)

  • Index Cond: (id = ah.ap_payment_id)
  • Filter: ((cid = 224) AND (cid = ah.cid))
113. 0.132 0.132 ↓ 0.0 0 132

Index Scan using idx_ap_payments_id on ap_payments ap (cost=0.42..0.62 rows=1 width=18) (actual time=0.001..0.001 rows=0 loops=132)

  • Index Cond: (id = ah1.ap_payment_id)
  • Filter: ((cid = 224) AND (cid = ah1.cid))
114. 0.396 0.396 ↑ 1.0 1 132

Index Scan using idx_ap_payees_id on ap_payees app (cost=0.29..0.33 rows=1 width=31) (actual time=0.003..0.003 rows=1 loops=132)

  • Index Cond: (id = COALESCE(ah.ap_payee_id, ah2.ap_payee_id))
  • Filter: (cid = COALESCE(ah.cid, ah2.cid))
115. 0.264 0.264 ↑ 1.0 1 132

Index Only Scan using idx_gat_temp_gl_account on gat_temp gat_temp_1 (cost=0.28..0.41 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=132)

  • Index Cond: (gl_account_id = gat_1.gl_account_id)
  • Heap Fetches: 132
116. 0.200 3.937 ↓ 183.0 183 1

Subquery Scan on "*SELECT* 3" (cost=21.39..21.95 rows=1 width=498) (actual time=1.394..3.937 rows=183 loops=1)

117. 2.370 3.737 ↓ 183.0 183 1

GroupAggregate (cost=21.39..21.93 rows=1 width=653) (actual time=1.389..3.737 rows=183 loops=1)

  • Group Key: p_2.id, p_2.property_name, p_2.lookup_code, gat_2.grouping_gl_account_id, gat_2.formatted_account_number, gat_2.name, gat_2.details
118. 0.498 1.367 ↓ 184.0 184 1

Sort (cost=21.39..21.39 rows=1 width=313) (actual time=1.332..1.367 rows=184 loops=1)

  • Sort Key: p_2.property_name, p_2.lookup_code, gat_2.grouping_gl_account_id, gat_2.formatted_account_number, gat_2.name, gat_2.details
  • Sort Method: quicksort Memory: 52kB
119. 0.339 0.869 ↓ 184.0 184 1

Nested Loop (cost=0.56..21.38 rows=1 width=313) (actual time=0.050..0.869 rows=184 loops=1)

120. 0.080 0.162 ↓ 184.0 184 1

Nested Loop (cost=0.28..13.07 rows=1 width=69) (actual time=0.027..0.162 rows=184 loops=1)

121. 0.014 0.014 ↑ 1.0 1 1

Index Scan using idx_properties_id on properties p_2 (cost=0.28..8.30 rows=1 width=33) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (id = 2458)
  • Filter: (cid = 224)
122. 0.068 0.068 ↓ 184.0 184 1

Seq Scan on beg_bal_temp sub_query (cost=0.00..4.76 rows=1 width=44) (actual time=0.009..0.068 rows=184 loops=1)

  • Filter: ((cid = 224) AND (property_id = 2458))
123. 0.368 0.368 ↑ 1.0 1 184

Index Scan using idx_gat_temp_gl_account on gat_temp gat_2 (cost=0.28..8.30 rows=1 width=260) (actual time=0.002..0.002 rows=1 loops=184)

  • Index Cond: (gl_account_id = sub_query.gl_account_id)
  • Filter: (cid = 224)
Planning time : 76.027 ms