explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LreA

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=2,499,653.30..2,499,934.61 rows=218 width=1,586) (actual rows= loops=)

  • 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.transaction_type_id, 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.details, outer_details.ar_code_type_id, outer_details.ar_trigger_id, outer_details.ar_code_id, outer_details.ar_transaction_payment_id, 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. 0.000 0.000 ↓ 0.0

Sort (cost=2,499,653.30..2,499,658.73 rows=2,172 width=1,554) (actual rows= loops=)

  • 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.transaction_type_id, 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.details, outer_details.ar_code_type_id, outer_details.ar_trigger_id, outer_details.ar_code_id, outer_details.ar_transaction_payment_id, 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
3. 0.000 0.000 ↓ 0.0

Subquery Scan on outer_details (cost=2,499,336.45..2,499,532.92 rows=2,172 width=1,554) (actual rows= loops=)

  • Filter: (outer_details.hide_zero_beginning_balance_for_no_activities <> 1)
4. 0.000 0.000 ↓ 0.0

WindowAgg (cost=2,499,336.45..2,499,461.97 rows=2,183 width=1,590) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=2,499,336.45..2,499,341.91 rows=2,183 width=1,362) (actual rows= loops=)

  • Sort Key: details.property_id, details.gl_account
6. 0.000 0.000 ↓ 0.0

WindowAgg (cost=2,499,128.06..2,499,215.38 rows=2,183 width=1,362) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=2,499,128.06..2,499,133.52 rows=2,183 width=1,354) (actual rows= loops=)

  • Sort Key: details.property_id, details.grouping_gl_account_id
8. 0.000 0.000 ↓ 0.0

Subquery Scan on details (cost=1,848.04..2,499,006.99 rows=2,183 width=1,354) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Append (cost=1,848.04..2,498,941.50 rows=2,183 width=1,390) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Result (cost=1,848.04..2,498,802.01 rows=1,827 width=1,376) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Append (cost=1,848.04..2,498,742.63 rows=1,827 width=1,348) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,848.04..2,492,720.37 rows=1,760 width=644) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,847.75..2,490,082.30 rows=1,760 width=594) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,847.32..2,487,797.66 rows=1,760 width=543) (actual rows= loops=)

  • Join Filter: (gh.cid = art1.cid)
15. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,846.60..2,478,240.95 rows=1,760 width=306) (actual rows= loops=)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{7,8,9,17}'::integer[]))
16. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=472.22..57,431.03 rows=1,760 width=294) (actual rows= loops=)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{13,14,18,23,24}'::integer[]))
17. 0.000 0.000 ↓ 0.0

Hash Join (cost=471.78..56,017.65 rows=1,760 width=286) (actual rows= loops=)

  • Hash Cond: (gh.gl_transaction_type_id = gtty.id)
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=468.10..56,007.32 rows=1,760 width=266) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on load_prop (cost=0.00..1.03 rows=1 width=28) (actual rows= loops=)

  • Filter: (property_id = 503992)
20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=468.10..55,953.48 rows=1,760 width=242) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Join (cost=467.66..23,063.09 rows=14,787 width=145) (actual rows= loops=)

  • Hash Cond: (gd.accrual_gl_account_id = gat.gl_account_id)
22. 0.000 0.000 ↓ 0.0

Index Scan using idx_gl_details_cid_property_id_post_month_accrual_gl_account_id on gl_details gd (cost=0.56..22,065.73 rows=23,108 width=80) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (property_id = 503992) AND (post_month >= '2019-07-01'::date) AND (post_month <= '2019-09-01'::date))
  • Filter: (gl_transaction_type_id = ANY ('{13,14,18,23,24,7,8,9,17}'::integer[]))
23. 0.000 0.000 ↓ 0.0

Hash (cost=448.54..448.54 rows=571 width=77) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on gat_temp gat (cost=0.00..448.54 rows=571 width=77) (actual rows= loops=)

  • Filter: ((cid = 14181) AND (grouping_gl_account_id = ANY ('{276755,277181,276723,282512,277994,282520,277182,276734,276746,276756,276757,276747,276758,276759,277856,305890,276760,277858,276761,276762,305887,276763,276764,276765,276766,282511,276752,276744,276751,276767,276768,276769,276770,279436,282510,276771,276772,276773,276774,276775,276776,276777,281803,276778,276779,281804,276780,276781,276782,281805,276783,281806,276784,281807,276785,281808,276786,281809,305917,305918,276787,281810,276788,281811,276789,281812,276790,281813,276791,281814,276792,281815,276793,276794,282471,305892,305891,305919,305920,305924,305925,306536,306537,305894,305893,276795,281816,276796,281817,276797,281818,276798,281819,276799,281820,276800,281821,276801,281822,276802,276803,281823,276804,281774,276805,281839,276806,281824,276807,281825,276808,281826,276809,281832,276810,281833,276811,281834,276812,281835,276813,276814,281836,276815,281837,276816,281838,276817,281827,276818,281828,276819,276820,281829,276821,282513,276822,276823,281830,276824,282521,276825,276826,276827,276828,276829,276830,276831,276832,276833,282524,276834,282522,276835,305868,276836,276837,276838,276839,276840,306544,276841,276842,276843,276844,276845,306545,277861,276745,276846,276847,276848,276719,276849,276738,276750,279435,276754,278169,276733,276851,276749,276852,276853,276854,276855,276856,276857,277823,276858,276859,276860,276861,276862,276863,276864,276865,276866,305856,276867,276868,276869,276870,276871,276872,276873,276748,276874,276742,276876,276753,276878,276879,276880,276881,277862,276882,276740,276739,276730,276731,276883,276736,276735,276737,276884,276885,276886,276887,276888,276889,276890,276891,277866,277867,276892,276893,276894,276895,276896,276897,276898,276899,276900,276901,276902,276903,276904,276905,276906,276907,276908,276909,276910,276911,276912,276913,276914,276915,276916,276917,276918,276919,276920,276921,276922,276923,276924,276925,276926,276927,276928,276929,276930,276931,276932,276933,276934,276935,276936,276937,276938,276939,276940,276941,276727,276942,276943,276944,276945,276946,276947,276948,276949,276732,276726,276724,276950,276951,276952,276953,276954,276725,276955,276956,276957,276958,276959,276960,276961,276721,276962,276963,276964,276965,276966,276967,276968,276969,276970,276971,276972,276973,276729,276974,276975,276976,276977,276978,276979,276980,276981,276982,276983,276720,276741,276743,276728,276985,276986,276987,276988,276989,276990,276991,276992,276993,276994,276995,276996,276997,276998,276999,277000,277001,277002,277003,277004,277005,277006,277007,277008,282036,277009,277010,277011,277012,277013,277014,277015,277016,277017,277868,277018,277019,277869,277179,277180,277020,277021,277022,277023,277024,277025,277026,277027,277870,277028,276722,277029,277871,277030,305849,277031,277032,277033,277034,277035,277036,277037,277038,277039,277040,277041,277042,277043,277044,277045,277046,277047,277048,277049,277050,277051,277052,277053,277054,277055,277056,277057,277058,277059,277060,277061,277062,277063,277064,277065,277066,277067,277068,277069,277070,277071,277072,277073,277074,277075,277076,277077,277078,277079,277080,277081,277082,277083,277084,277085,277086,277087,277088,277089,277090,277091,277092,277093,277094,277095,277096,277097,277098,277099,277100,277101,277102,277103,277872,277104,277105,277106,277107,277108,277109,277110,277111,276984,277112,282523,277113,277114,281776,281777,281778,281779,281780,281781,281782,281783,281784,281785,281786,281787,281788,281789,281790,281791,281792,281793,281794,305866,277115,277116,277117,277118,277857,277873,277874,277875,277119,277120,277121,277122,277123,277124,277125,277126,277127,277128,277129,277130,277131,277132,277133,277134,277135,277136,277137,277138,277139,277140,305915,277141,277142,277143,277144,277145,277146,277147,277148,277149,277150,277151,277152,277153,277154,277155,277156,277157,277158,277159,277160,277161,277162,277163,277164,277165,277166,277167,277168,277169,277170,277171,277172,277173,277174,282536,277175,277176,277177,305867,277178}'::integer[])))
25. 0.000 0.000 ↓ 0.0

Index Scan using pk_gl_headers on gl_headers gh (cost=0.43..2.22 rows=1 width=101) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (id = gd.gl_header_id))
  • Filter: ((NOT is_template) AND (gl_book_id = 103) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
26. 0.000 0.000 ↓ 0.0

Hash (cost=2.81..2.81 rows=27 width=24) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on gl_transaction_types gtty (cost=0.00..2.81 rows=27 width=24) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using pk_ar_allocations on ar_allocations ara (cost=0.43..0.77 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((cid = gh.cid) AND (cid = 14181) AND (id = gh.reference_id))
29. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ar_transactions art (cost=1,374.39..1,375.43 rows=1 width=20) (actual rows= loops=)

  • Recheck Cond: (((cid = 14181) AND (id = gh.reference_id)) OR ((cid = 14181) AND (id = ara.credit_ar_transaction_id)))
  • Filter: (gh.cid = cid)
30. 0.000 0.000 ↓ 0.0

BitmapOr (cost=1,374.39..1,374.39 rows=1 width=0) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pk_ar_transactions (cost=0.00..0.49 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (id = gh.reference_id))
32. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pk_ar_transactions (cost=0.00..0.48 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (id = ara.credit_ar_transaction_id))
33. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.72..5.40 rows=1 width=249) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.58..0.97 rows=1 width=232) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Index Scan using pk_ar_transactions on ar_transactions art1 (cost=0.43..0.79 rows=1 width=218) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (id = COALESCE(ara.charge_ar_transaction_id, art.id)))
36. 0.000 0.000 ↓ 0.0

Index Scan using pk_ar_triggers on ar_triggers att (cost=0.14..0.18 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (art1.ar_trigger_id = id)
37. 0.000 0.000 ↓ 0.0

Index Scan using idx_temp_cid on ar_codes_temp ac (cost=0.14..4.39 rows=1 width=25) (actual rows= loops=)

  • Index Cond: ((cid = art1.cid) AND (cid = 14181))
  • Filter: (id = art1.ar_code_id)
38. 0.000 0.000 ↓ 0.0

Index Scan using pk_cached_leases on cached_leases cl (cost=0.42..1.30 rows=1 width=63) (actual rows= loops=)

  • Index Cond: ((cid = gd.cid) AND (cid = 14181) AND (id = gd.lease_id))
39. 0.000 0.000 ↓ 0.0

Index Scan using idx_ar_deposits_id on ar_deposits ad (cost=0.29..0.59 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (gh.reference_id = id)
  • Filter: ((cid = 14181) AND (gh.gl_transaction_type_id = gl_transaction_type_id))
40. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=528.20..5,969.47 rows=67 width=522) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=528.20..5,967.46 rows=67 width=522) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=527.79..5,887.13 rows=67 width=484) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=527.37..5,842.90 rows=67 width=479) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=526.94..5,798.67 rows=67 width=470) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=526.52..5,755.59 rows=67 width=441) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=526.09..5,708.36 rows=67 width=433) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=525.66..5,673.25 rows=67 width=437) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=525.24..5,619.83 rows=67 width=433) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=524.81..5,578.06 rows=67 width=393) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=524.53..5,554.61 rows=67 width=410) (actual rows= loops=)

  • Hash Cond: ((gd_1.cid = pu.cid) AND (CASE WHEN (gd_1.gl_transaction_type_id = 1) THEN gd_1.property_unit_id ELSE COALESCE(ad1.property_unit_id, ad_1.property_unit_id) END = pu.id))
51. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=473.08..5,500.56 rows=67 width=418) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=472.65..5,405.67 rows=67 width=370) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=472.21..5,325.60 rows=67 width=318) (actual rows= loops=)

  • Join Filter: (gh_1.gl_transaction_type_id = ANY ('{4,5}'::integer[]))
54. 0.000 0.000 ↓ 0.0

Hash Join (cost=471.78..5,287.90 rows=67 width=306) (actual rows= loops=)

  • Hash Cond: (gh_1.gl_transaction_type_id = gtty_1.id)
55. 0.000 0.000 ↓ 0.0

Nested Loop (cost=468.10..5,283.98 rows=67 width=282) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Hash Join (cost=467.66..4,427.10 rows=566 width=185) (actual rows= loops=)

  • Hash Cond: (gd_1.accrual_gl_account_id = gat_1.gl_account_id)
57. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..3,939.71 rows=885 width=120) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Seq Scan on load_prop load_prop_1 (cost=0.00..1.03 rows=1 width=28) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Index Scan using idx_gl_details_cid_property_id_post_month_accrual_gl_account_id on gl_details gd_1 (cost=0.56..3,912.13 rows=885 width=96) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (property_id = load_prop_1.property_id) AND (post_month >= '2019-07-01'::date) AND (post_month <= '2019-09-01'::date))
  • Filter: (gl_transaction_type_id <> ALL ('{13,14,18,23,24,7,8,9,17}'::integer[]))
60. 0.000 0.000 ↓ 0.0

Hash (cost=448.54..448.54 rows=571 width=77) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Seq Scan on gat_temp gat_1 (cost=0.00..448.54 rows=571 width=77) (actual rows= loops=)

  • Filter: ((cid = 14181) AND (grouping_gl_account_id = ANY ('{276755,277181,276723,282512,277994,282520,277182,276734,276746,276756,276757,276747,276758,276759,277856,305890,276760,277858,276761,276762,305887,276763,276764,276765,276766,282511,276752,276744,276751,276767,276768,276769,276770,279436,282510,276771,276772,276773,276774,276775,276776,276777,281803,276778,276779,281804,276780,276781,276782,281805,276783,281806,276784,281807,276785,281808,276786,281809,305917,305918,276787,281810,276788,281811,276789,281812,276790,281813,276791,281814,276792,281815,276793,276794,282471,305892,305891,305919,305920,305924,305925,306536,306537,305894,305893,276795,281816,276796,281817,276797,281818,276798,281819,276799,281820,276800,281821,276801,281822,276802,276803,281823,276804,281774,276805,281839,276806,281824,276807,281825,276808,281826,276809,281832,276810,281833,276811,281834,276812,281835,276813,276814,281836,276815,281837,276816,281838,276817,281827,276818,281828,276819,276820,281829,276821,282513,276822,276823,281830,276824,282521,276825,276826,276827,276828,276829,276830,276831,276832,276833,282524,276834,282522,276835,305868,276836,276837,276838,276839,276840,306544,276841,276842,276843,276844,276845,306545,277861,276745,276846,276847,276848,276719,276849,276738,276750,279435,276754,278169,276733,276851,276749,276852,276853,276854,276855,276856,276857,277823,276858,276859,276860,276861,276862,276863,276864,276865,276866,305856,276867,276868,276869,276870,276871,276872,276873,276748,276874,276742,276876,276753,276878,276879,276880,276881,277862,276882,276740,276739,276730,276731,276883,276736,276735,276737,276884,276885,276886,276887,276888,276889,276890,276891,277866,277867,276892,276893,276894,276895,276896,276897,276898,276899,276900,276901,276902,276903,276904,276905,276906,276907,276908,276909,276910,276911,276912,276913,276914,276915,276916,276917,276918,276919,276920,276921,276922,276923,276924,276925,276926,276927,276928,276929,276930,276931,276932,276933,276934,276935,276936,276937,276938,276939,276940,276941,276727,276942,276943,276944,276945,276946,276947,276948,276949,276732,276726,276724,276950,276951,276952,276953,276954,276725,276955,276956,276957,276958,276959,276960,276961,276721,276962,276963,276964,276965,276966,276967,276968,276969,276970,276971,276972,276973,276729,276974,276975,276976,276977,276978,276979,276980,276981,276982,276983,276720,276741,276743,276728,276985,276986,276987,276988,276989,276990,276991,276992,276993,276994,276995,276996,276997,276998,276999,277000,277001,277002,277003,277004,277005,277006,277007,277008,282036,277009,277010,277011,277012,277013,277014,277015,277016,277017,277868,277018,277019,277869,277179,277180,277020,277021,277022,277023,277024,277025,277026,277027,277870,277028,276722,277029,277871,277030,305849,277031,277032,277033,277034,277035,277036,277037,277038,277039,277040,277041,277042,277043,277044,277045,277046,277047,277048,277049,277050,277051,277052,277053,277054,277055,277056,277057,277058,277059,277060,277061,277062,277063,277064,277065,277066,277067,277068,277069,277070,277071,277072,277073,277074,277075,277076,277077,277078,277079,277080,277081,277082,277083,277084,277085,277086,277087,277088,277089,277090,277091,277092,277093,277094,277095,277096,277097,277098,277099,277100,277101,277102,277103,277872,277104,277105,277106,277107,277108,277109,277110,277111,276984,277112,282523,277113,277114,281776,281777,281778,281779,281780,281781,281782,281783,281784,281785,281786,281787,281788,281789,281790,281791,281792,281793,281794,305866,277115,277116,277117,277118,277857,277873,277874,277875,277119,277120,277121,277122,277123,277124,277125,277126,277127,277128,277129,277130,277131,277132,277133,277134,277135,277136,277137,277138,277139,277140,305915,277141,277142,277143,277144,277145,277146,277147,277148,277149,277150,277151,277152,277153,277154,277155,277156,277157,277158,277159,277160,277161,277162,277163,277164,277165,277166,277167,277168,277169,277170,277171,277172,277173,277174,282536,277175,277176,277177,305867,277178}'::integer[])))
62. 0.000 0.000 ↓ 0.0

Index Scan using pk_gl_headers on gl_headers gh_1 (cost=0.43..1.51 rows=1 width=101) (actual rows= loops=)

  • Index Cond: ((cid = 14181) AND (id = gd_1.gl_header_id))
  • Filter: ((is_template IS FALSE) AND (gl_book_id = 103) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
63. 0.000 0.000 ↓ 0.0

Hash (cost=2.81..2.81 rows=27 width=24) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Seq Scan on gl_transaction_types gtty_1 (cost=0.00..2.81 rows=27 width=24) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Index Scan using pk_ap_allocations on ap_allocations aa (cost=0.43..0.53 rows=1 width=24) (actual rows= loops=)

  • Index Cond: ((gh_1.cid = cid) AND (cid = 14181) AND (gh_1.reference_id = id))
  • Filter: (gl_transaction_type_id = gh_1.gl_transaction_type_id)
66. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_details on ap_details ad_1 (cost=0.43..1.17 rows=1 width=60) (actual rows= loops=)

  • Index Cond: (aa.credit_ap_detail_id = id)
  • Filter: ((cid = 14181) AND (aa.cid = cid))
67. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_details on ap_details ad1 (cost=0.43..1.39 rows=1 width=60) (actual rows= loops=)

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

Hash (cost=26.85..26.85 rows=703 width=12) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Seq Scan on property_units_temp pu (cost=0.00..26.85 rows=703 width=12) (actual rows= loops=)

  • Filter: (cid = 14181)
70. 0.000 0.000 ↓ 0.0

Index Scan using idx_id on property_buildings_temp pb (cost=0.28..0.32 rows=1 width=11) (actual rows= loops=)

  • 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_1.property_building_id, gd_1.property_building_id) END)
  • Filter: ((cid = 14181) AND (cid = gd_1.cid))
71. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_headers on ap_headers ah (cost=0.43..0.59 rows=1 width=60) (actual rows= loops=)

  • Index Cond: (ad_1.ap_header_id = id)
  • Filter: ((cid = 14181) AND (ad_1.cid = cid) AND (ad_1.gl_transaction_type_id = gl_transaction_type_id) AND (ad_1.post_month = post_month))
72. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_headers on ap_headers ah1 (cost=0.43..0.77 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id = aa.lump_ap_header_id)
  • Filter: ((cid = 14181) AND (cid = aa.cid))
73. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_headers on ap_headers ah2 (cost=0.43..0.49 rows=1 width=24) (actual rows= loops=)

  • 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))
74. 0.000 0.000 ↓ 0.0

Index Scan using pk_lease_customers on lease_customers lc (cost=0.42..0.70 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((cid = COALESCE(ah2.cid, ah.cid)) AND (id = COALESCE(ah2.lease_customer_id, ah.lease_customer_id)))
75. 0.000 0.000 ↓ 0.0

Index Scan using idx_customers_id on customers cust (cost=0.43..0.61 rows=1 width=41) (actual rows= loops=)

  • Index Cond: (id = lc.customer_id)
  • Filter: (cid = lc.cid)
76. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_payments_id on ap_payments ap_ref (cost=0.42..0.63 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (id = ah.ap_payment_id)
  • Filter: ((cid = 14181) AND (cid = ah.cid))
77. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_payments_id on ap_payments ap (cost=0.42..0.63 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (id = ah1.ap_payment_id)
  • Filter: ((cid = 14181) AND (cid = ah1.cid))
78. 0.000 0.000 ↓ 0.0

Index Scan using idx_ap_payees_id on ap_payees app (cost=0.41..0.47 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = COALESCE(ah.ap_payee_id, ah2.ap_payee_id))
  • Filter: (cid = COALESCE(ah.cid, ah2.cid))
79. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=113.68..139.49 rows=356 width=579) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

HashAggregate (cost=113.68..126.14 rows=356 width=495) (actual rows= loops=)

  • Group Key: p.id, p.property_name, p.lookup_code, gat_2.grouping_gl_account_id, gat_2.formatted_account_number, gat_2.name, gat_2.gl_account
81. 0.000 0.000 ↓ 0.0

Nested Loop (cost=64.27..105.67 rows=356 width=101) (actual rows= loops=)

  • Join Filter: (p.id = load_prop_2.property_id)
82. 0.000 0.000 ↓ 0.0

Seq Scan on load_prop load_prop_2 (cost=0.00..1.03 rows=1 width=4) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Nested Loop (cost=64.27..103.95 rows=21 width=105) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Hash Join (cost=63.99..79.88 rows=22 width=48) (actual rows= loops=)

  • Hash Cond: (bbt.property_id = p.id)
85. 0.000 0.000 ↓ 0.0

Seq Scan on beg_bal_temp bbt (cost=0.00..14.93 rows=367 width=18) (actual rows= loops=)

  • Filter: (cid = 14181)
86. 0.000 0.000 ↓ 0.0

Hash (cost=61.85..61.85 rows=66 width=34) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Index Scan using idx_properties_cid_id_is_disabled_remote_primary_key on properties p (cost=0.28..61.85 rows=66 width=34) (actual rows= loops=)

  • Index Cond: (cid = 14181)
88. 0.000 0.000 ↓ 0.0

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat_2 (cost=0.28..1.06 rows=1 width=73) (actual rows= loops=)

  • Index Cond: (gl_account_id = bbt.gl_account_id)
  • Filter: ((cid = 14181) AND (grouping_gl_account_id = ANY ('{276755,277181,276723,282512,277994,282520,277182,276734,276746,276756,276757,276747,276758,276759,277856,305890,276760,277858,276761,276762,305887,276763,276764,276765,276766,282511,276752,276744,276751,276767,276768,276769,276770,279436,282510,276771,276772,276773,276774,276775,276776,276777,281803,276778,276779,281804,276780,276781,276782,281805,276783,281806,276784,281807,276785,281808,276786,281809,305917,305918,276787,281810,276788,281811,276789,281812,276790,281813,276791,281814,276792,281815,276793,276794,282471,305892,305891,305919,305920,305924,305925,306536,306537,305894,305893,276795,281816,276796,281817,276797,281818,276798,281819,276799,281820,276800,281821,276801,281822,276802,276803,281823,276804,281774,276805,281839,276806,281824,276807,281825,276808,281826,276809,281832,276810,281833,276811,281834,276812,281835,276813,276814,281836,276815,281837,276816,281838,276817,281827,276818,281828,276819,276820,281829,276821,282513,276822,276823,281830,276824,282521,276825,276826,276827,276828,276829,276830,276831,276832,276833,282524,276834,282522,276835,305868,276836,276837,276838,276839,276840,306544,276841,276842,276843,276844,276845,306545,277861,276745,276846,276847,276848,276719,276849,276738,276750,279435,276754,278169,276733,276851,276749,276852,276853,276854,276855,276856,276857,277823,276858,276859,276860,276861,276862,276863,276864,276865,276866,305856,276867,276868,276869,276870,276871,276872,276873,276748,276874,276742,276876,276753,276878,276879,276880,276881,277862,276882,276740,276739,276730,276731,276883,276736,276735,276737,276884,276885,276886,276887,276888,276889,276890,276891,277866,277867,276892,276893,276894,276895,276896,276897,276898,276899,276900,276901,276902,276903,276904,276905,276906,276907,276908,276909,276910,276911,276912,276913,276914,276915,276916,276917,276918,276919,276920,276921,276922,276923,276924,276925,276926,276927,276928,276929,276930,276931,276932,276933,276934,276935,276936,276937,276938,276939,276940,276941,276727,276942,276943,276944,276945,276946,276947,276948,276949,276732,276726,276724,276950,276951,276952,276953,276954,276725,276955,276956,276957,276958,276959,276960,276961,276721,276962,276963,276964,276965,276966,276967,276968,276969,276970,276971,276972,276973,276729,276974,276975,276976,276977,276978,276979,276980,276981,276982,276983,276720,276741,276743,276728,276985,276986,276987,276988,276989,276990,276991,276992,276993,276994,276995,276996,276997,276998,276999,277000,277001,277002,277003,277004,277005,277006,277007,277008,282036,277009,277010,277011,277012,277013,277014,277015,277016,277017,277868,277018,277019,277869,277179,277180,277020,277021,277022,277023,277024,277025,277026,277027,277870,277028,276722,277029,277871,277030,305849,277031,277032,277033,277034,277035,277036,277037,277038,277039,277040,277041,277042,277043,277044,277045,277046,277047,277048,277049,277050,277051,277052,277053,277054,277055,277056,277057,277058,277059,277060,277061,277062,277063,277064,277065,277066,277067,277068,277069,277070,277071,277072,277073,277074,277075,277076,277077,277078,277079,277080,277081,277082,277083,277084,277085,277086,277087,277088,277089,277090,277091,277092,277093,277094,277095,277096,277097,277098,277099,277100,277101,277102,277103,277872,277104,277105,277106,277107,277108,277109,277110,277111,276984,277112,282523,277113,277114,281776,281777,281778,281779,281780,281781,281782,281783,281784,281785,281786,281787,281788,281789,281790,281791,281792,281793,281794,305866,277115,277116,277117,277118,277857,277873,277874,277875,277119,277120,277121,277122,277123,277124,277125,277126,277127,277128,277129,277130,277131,277132,277133,277134,277135,277136,277137,277138,277139,277140,305915,277141,277142,277143,277144,277145,277146,277147,277148,277149,277150,277151,277152,277153,277154,277155,277156,277157,277158,277159,277160,277161,277162,277163,277164,277165,277166,277167,277168,277169,277170,277171,277172,277173,277174,282536,277175,277176,277177,305867,277178}'::integer[])))