explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FKU1

Settings
# exclusive inclusive rows x rows loops node
1. 570.762 22,351.253 ↓ 798.9 159,779 1

GroupAggregate (cost=567,544.72..567,633.05 rows=200 width=1,650) (actual time=21,705.439..22,351.253 rows=159,779 loops=1)

  • Group Key: outer_details.property_name, outer_details.account_number, outer_details.is_beginning_balance, outer_details.transaction_date, outer_details.post_month, outer_details.post_date, outer_details.gl_detail_id, outer_details.property_id, outer_details.lookup_code, outer_details.grouping_gl_account_id, outer_details.gl_account, 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.job, outer_details.job_cost_code, 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. 4,388.254 21,780.491 ↓ 276.9 177,487 1

Sort (cost=567,544.72..567,546.33 rows=641 width=1,618) (actual time=21,705.421..21,780.491 rows=177,487 loops=1)

  • Sort Key: outer_details.property_name, outer_details.account_number, outer_details.is_beginning_balance DESC, outer_details.transaction_date, outer_details.post_month, outer_details.post_date, outer_details.gl_detail_id, outer_details.property_id, outer_details.lookup_code, outer_details.grouping_gl_account_id, outer_details.gl_account, 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.job, outer_details.job_cost_code, 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: 97,008kB
3. 169.450 17,392.237 ↓ 276.9 177,487 1

Subquery Scan on outer_details (cost=567,482.64..567,514.84 rows=641 width=1,618) (actual time=16,775.566..17,392.237 rows=177,487 loops=1)

  • Filter: (outer_details.hide_zero_beginning_balance_for_no_activities <> 1)
  • Rows Removed by Filter: 41
4. 374.926 17,222.787 ↓ 275.7 177,528 1

WindowAgg (cost=567,482.64..567,506.79 rows=644 width=1,654) (actual time=16,775.562..17,222.787 rows=177,528 loops=1)

5. 1,818.629 16,847.861 ↓ 275.7 177,528 1

Sort (cost=567,482.64..567,484.25 rows=644 width=1,426) (actual time=16,775.544..16,847.861 rows=177,528 loops=1)

  • Sort Key: details.property_id, details.gl_account
  • Sort Method: quicksort Memory: 91,465kB
6. 623.964 15,029.232 ↓ 275.7 177,528 1

WindowAgg (cost=567,439.71..567,452.59 rows=644 width=1,426) (actual time=14,386.719..15,029.232 rows=177,528 loops=1)

7. 407.361 14,405.268 ↓ 275.7 177,528 1

Sort (cost=567,439.71..567,441.32 rows=644 width=1,418) (actual time=14,327.806..14,405.268 rows=177,528 loops=1)

  • Sort Key: details.property_id, details.grouping_gl_account_id
  • Sort Method: quicksort Memory: 88,328kB
8. 188.835 13,997.907 ↓ 275.7 177,528 1

Subquery Scan on details (cost=1,910.40..567,409.67 rows=644 width=1,418) (actual time=1,612.582..13,997.907 rows=177,528 loops=1)

9. 139.767 13,809.072 ↓ 275.7 177,528 1

Append (cost=1,910.40..567,403.23 rows=644 width=1,454) (actual time=1,612.580..13,809.072 rows=177,528 loops=1)

10. 232.540 13,667.964 ↓ 285.7 177,413 1

Result (cost=1,910.40..567,324.64 rows=621 width=1,440) (actual time=1,612.579..13,667.964 rows=177,413 loops=1)

11. 154.476 13,435.424 ↓ 285.7 177,413 1

Append (cost=1,910.40..567,316.88 rows=621 width=1,412) (actual time=1,612.576..13,435.424 rows=177,413 loops=1)

12. 1,328.995 7,962.573 ↓ 507.3 106,030 1

Nested Loop Left Join (cost=1,910.40..413,646.14 rows=209 width=1,209) (actual time=1,612.574..7,962.573 rows=106,030 loops=1)

13. 144.745 6,315.488 ↓ 507.3 106,030 1

Hash Left Join (cost=1,909.98..413,097.91 rows=209 width=1,081) (actual time=1,610.673..6,315.488 rows=106,030 loops=1)

  • Hash Cond: ((art1.cid = ac.cid) AND (art1.ar_code_id = ac.id))
14. 138.594 6,170.630 ↓ 507.3 106,030 1

Hash Left Join (cost=1,906.07..413,091.54 rows=209 width=1,067) (actual time=1,610.550..6,170.630 rows=106,030 loops=1)

  • Hash Cond: (art1.ar_trigger_id = att.id)
15. 163.560 6,031.928 ↓ 507.3 106,030 1

Nested Loop Left Join (cost=1,897.11..413,082.02 rows=209 width=1,053) (actual time=1,610.427..6,031.928 rows=106,030 loops=1)

16. 273.322 5,656.308 ↓ 507.3 106,030 1

Nested Loop Left Join (cost=1,896.69..412,934.24 rows=209 width=1,021) (actual time=1,610.415..5,656.308 rows=106,030 loops=1)

  • Join Filter: (gh.cid = art1.cid)
17. 365.354 5,170.926 ↓ 507.3 106,030 1

Nested Loop Left Join (cost=1,896.25..412,736.14 rows=209 width=806) (actual time=1,610.406..5,170.926 rows=106,030 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{7,8,9,17}'::integer[]))
  • Rows Removed by Join Filter: 33,974
18. 192.870 4,063.362 ↓ 507.3 106,030 1

Nested Loop Left Join (cost=1.85..15,962.29 rows=209 width=794) (actual time=1,610.355..4,063.362 rows=106,030 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{13,14,18,23,24}'::integer[]))
19. 1,345.368 3,552.402 ↓ 507.3 106,030 1

Nested Loop (cost=1.41..15,780.15 rows=209 width=786) (actual time=1,610.336..3,552.402 rows=106,030 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = gtty.id)
  • Rows Removed by Join Filter: 2,756,780
20. 0.081 0.081 ↑ 1.0 27 1

Index Scan using pk_gl_transaction_types on gl_transaction_types gtty (cost=0.14..15.39 rows=27 width=24) (actual time=0.007..0.081 rows=27 loops=1)

21. 1,202.536 2,206.953 ↓ 507.3 106,030 27

Materialize (cost=1.28..15,680.64 rows=209 width=766) (actual time=0.007..81.739 rows=106,030 loops=27)

22. 210.586 1,004.417 ↓ 507.3 106,030 1

Nested Loop (cost=1.28..15,679.59 rows=209 width=766) (actual time=0.161..1,004.417 rows=106,030 loops=1)

23. 161.794 581.771 ↓ 488.6 106,030 1

Nested Loop (cost=1.00..15,439.31 rows=217 width=701) (actual time=0.152..581.771 rows=106,030 loops=1)

24. 91.845 207.917 ↓ 69.3 106,030 1

Nested Loop (cost=0.56..5,054.08 rows=1,530 width=603) (actual time=0.126..207.917 rows=106,030 loops=1)

25. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on load_prop (cost=0.00..1.05 rows=5 width=524) (actual time=0.003..0.007 rows=5 loops=1)

26. 116.065 116.065 ↓ 69.3 21,206 5

Index Scan using idx_gl_details_cid_property_id_post_month on gl_details gd (cost=0.56..1,007.55 rows=306 width=83) (actual time=0.024..23.213 rows=21,206 loops=5)

  • Index Cond: ((cid = 14,181) AND (property_id = load_prop.property_id) AND (property_id = ANY ('{960622,960623,960626,503486,508477}'::integer[])) AND (post_month >= '2019-01-01'::date) AND (post_month <= '2019-05-01'::date))
  • Filter: (gl_transaction_type_id = ANY ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 14,299
27. 212.060 212.060 ↑ 1.0 1 106,030

Index Scan using idx_gl_headers_id on gl_headers gh (cost=0.44..6.79 rows=1 width=102) (actual time=0.002..0.002 rows=1 loops=106,030)

  • Index Cond: (id = gd.gl_header_id)
  • Filter: ((NOT is_template) AND (cid = 14,181) AND (gl_book_id = 103) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
28. 212.060 212.060 ↑ 1.0 1 106,030

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat (cost=0.28..1.10 rows=1 width=77) (actual time=0.002..0.002 rows=1 loops=106,030)

  • Index Cond: (gl_account_id = gd.accrual_gl_account_id)
  • Filter: ((cid = 14,181) AND (grouping_gl_account_id = ANY ('{276755,277181,276723,282512,277994,282520,307023,307024,277182,276734,276746,276756,276757,276747,276758,276759,277856,305890,306562,276760,277858,276761,276762,305887,276763,276764,276765,276766,282511,276752,276744,276751,276767,276768,276769,276770,279436,282510,306688,306690,307032,276771,276772,276773,276774,276775,276776,276777,281803,276778,276779,281804,276780,276781,307058,307059,307035,307036,307037,307038,307039,307040,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,306552,306553,305894,305893,276795,281816,276796,281817,276797,281818,276798,281819,276799,281820,276800,281821,276801,281822,276802,306554,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,307041,307060,307042,276836,306932,276837,306996,306997,306998,306999,307025,276838,276839,276840,306544,306931,307027,276841,276842,276843,276844,276845,306545,306933,307026,307028,277861,276745,276846,276847,276848,276719,276849,276738,276750,279435,276754,278169,306551,276733,276851,276749,276852,276853,276854,276855,276856,276857,277823,276858,276859,276860,276861,276862,276863,276864,276865,276866,305856,307009,276867,276868,276869,276870,276871,276872,276873,276748,276874,276742,276876,276753,276878,276879,276880,307031,307000,307043,276881,307061,307044,307045,307046,307047,307048,307049,307050,277862,276882,307051,276740,276739,276730,307052,307053,276731,276883,276736,276735,276737,276884,306572,276885,276886,307003,276887,276888,276889,276890,276891,276741,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,306947,306949,306948,276720,277866,276743,307001,276728,307054,276985,276986,276987,276988,276989,276990,276991,276992,276993,276994,276995,276996,276997,276998,276999,277000,277001,277002,277003,277004,277005,277006,277007,307011,277008,282036,277009,277010,277011,277012,306567,277013,277014,277015,277016,277017,277868,277018,277019,277869,277179,277180,306560,307004,277020,277021,277022,277023,277024,277025,277026,277027,277870,277028,276722,277029,277871,277030,305849,306689,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,306694,307030,277111,276984,277112,282523,277113,277114,307029,281776,306954,281777,281778,281779,281780,281781,281782,281783,281784,281785,281786,281787,281788,281789,306955,281790,281791,281792,306956,281793,306957,281794,306958,305866,306566,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,306914,277175,277176,277177,305867,277178,306686}'::integer[])))
29. 318.090 318.090 ↓ 0.0 0 106,030

Index Scan using pk_ar_allocations on ar_allocations ara (cost=0.43..0.86 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=106,030)

  • Index Cond: ((cid = gh.cid) AND (cid = 14,181) AND (id = gh.reference_id))
30. 212.060 742.210 ↑ 1.0 1 106,030

Bitmap Heap Scan on ar_transactions art (cost=1,894.40..1,898.42 rows=1 width=20) (actual time=0.007..0.007 rows=1 loops=106,030)

  • Recheck Cond: (((cid = 14,181) AND (id = gh.reference_id)) OR ((cid = 14,181) AND (id = ara.credit_ar_transaction_id)))
  • Filter: (gh.cid = cid)
  • Heap Blocks: exact=106,318
31. 212.060 530.150 ↓ 0.0 0 106,030

BitmapOr (cost=1,894.40..1,894.40 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=106,030)

32. 212.060 212.060 ↑ 1.0 1 106,030

Bitmap Index Scan on pk_ar_transactions (cost=0.00..0.50 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=106,030)

  • Index Cond: ((cid = 14,181) AND (id = gh.reference_id))
33. 106.030 106.030 ↓ 0.0 0 106,030

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

  • Index Cond: ((cid = 14,181) AND (id = ara.credit_ar_transaction_id))
34. 212.060 212.060 ↑ 1.0 1 106,030

Index Scan using pk_ar_transactions on ar_transactions art1 (cost=0.43..0.94 rows=1 width=223) (actual time=0.002..0.002 rows=1 loops=106,030)

  • Index Cond: ((cid = 14,181) AND (id = COALESCE(ara.charge_ar_transaction_id, art.id)))
35. 212.060 212.060 ↓ 0.0 0 106,030

Index Scan using idx_ar_deposits_id on ar_deposits ad (cost=0.42..0.70 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=106,030)

  • Index Cond: (gh.reference_id = id)
  • Filter: ((cid = 14,181) AND (gh.gl_transaction_type_id = gl_transaction_type_id))
36. 0.046 0.108 ↑ 1.0 87 1

Hash (cost=7.87..7.87 rows=87 width=18) (actual time=0.108..0.108 rows=87 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
37. 0.062 0.062 ↑ 1.0 87 1

Seq Scan on ar_triggers att (cost=0.00..7.87 rows=87 width=18) (actual time=0.006..0.062 rows=87 loops=1)

38. 0.057 0.113 ↑ 1.0 106 1

Hash (cost=2.33..2.33 rows=106 width=26) (actual time=0.113..0.113 rows=106 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
39. 0.056 0.056 ↑ 1.0 106 1

Seq Scan on ar_codes_temp ac (cost=0.00..2.33 rows=106 width=26) (actual time=0.008..0.056 rows=106 loops=1)

  • Filter: (cid = 14,181)
40. 318.090 318.090 ↑ 1.0 1 106,030

Index Scan using pk_cached_leases on cached_leases cl (cost=0.42..1.74 rows=1 width=60) (actual time=0.003..0.003 rows=1 loops=106,030)

  • Index Cond: ((cid = gd.cid) AND (cid = 14,181) AND (id = gd.lease_id))
41. 87.297 5,318.375 ↓ 173.3 71,383 1

Subquery Scan on "*SELECT* 2" (cost=6.54..153,668.65 rows=412 width=1,082) (actual time=0.283..5,318.375 rows=71,383 loops=1)

42. 541.364 5,231.078 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=6.54..153,664.53 rows=412 width=1,082) (actual time=0.280..5,231.078 rows=71,383 loops=1)

43. 159.737 4,546.948 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=6.12..153,086.37 rows=412 width=1,021) (actual time=0.236..4,546.948 rows=71,383 loops=1)

44. 156.669 4,244.445 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=5.83..152,948.72 rows=412 width=1,009) (actual time=0.231..4,244.445 rows=71,383 loops=1)

45. 104.210 4,087.776 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=5.41..152,615.50 rows=412 width=1,004) (actual time=0.226..4,087.776 rows=71,383 loops=1)

46. 154.830 3,840.800 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=4.99..152,282.27 rows=412 width=995) (actual time=0.221..3,840.800 rows=71,383 loops=1)

47. 165.789 3,685.970 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=4.56..151,940.99 rows=412 width=969) (actual time=0.215..3,685.970 rows=71,383 loops=1)

48. 119.041 3,520.181 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=4.13..151,652.94 rows=412 width=961) (actual time=0.209..3,520.181 rows=71,383 loops=1)

49. 154.766 3,186.991 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=3.71..151,447.07 rows=412 width=965) (actual time=0.204..3,186.991 rows=71,383 loops=1)

50. 130.272 3,032.225 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=3.28..151,066.37 rows=412 width=961) (actual time=0.199..3,032.225 rows=71,383 loops=1)

51. 167.204 2,759.187 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=2.85..150,802.10 rows=412 width=921) (actual time=0.192..2,759.187 rows=71,383 loops=1)

52. 132.859 2,591.983 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=2.57..150,674.22 rows=412 width=938) (actual time=0.186..2,591.983 rows=71,383 loops=1)

  • Join Filter: ((pu.cid = gd_1.cid) AND (pu.id = 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))
53. 150.203 2,459.124 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=2.57..150,599.76 rows=412 width=918) (actual time=0.179..2,459.124 rows=71,383 loops=1)

54. 136.741 2,094.772 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=2.14..148,819.09 rows=412 width=870) (actual time=0.174..2,094.772 rows=71,383 loops=1)

55. 134.744 1,815.265 ↓ 173.3 71,383 1

Nested Loop Left Join (cost=1.71..147,859.17 rows=412 width=818) (actual time=0.169..1,815.265 rows=71,383 loops=1)

  • Join Filter: (gh_1.gl_transaction_type_id = ANY ('{4,5}'::integer[]))
56. 297.771 1,466.372 ↓ 173.3 71,383 1

Nested Loop (cost=1.28..147,626.66 rows=412 width=806) (actual time=0.161..1,466.372 rows=71,383 loops=1)

  • Join Filter: (gh_1.gl_transaction_type_id = gtty_1.id)
  • Rows Removed by Join Filter: 468,059
57. 166.273 954.452 ↓ 173.3 71,383 1

Nested Loop (cost=1.28..147,463.11 rows=412 width=782) (actual time=0.148..954.452 rows=71,383 loops=1)

58. 99.889 574.030 ↓ 167.2 71,383 1

Nested Loop (cost=1.00..146,990.51 rows=427 width=717) (actual time=0.137..574.030 rows=71,383 loops=1)

59. 75.478 188.161 ↓ 23.8 71,495 1

Nested Loop (cost=0.56..129,431.94 rows=3,010 width=619) (actual time=0.040..188.161 rows=71,495 loops=1)

60. 0.013 0.013 ↑ 1.0 5 1

Seq Scan on load_prop load_prop_1 (cost=0.00..1.05 rows=5 width=524) (actual time=0.009..0.013 rows=5 loops=1)

61. 112.670 112.670 ↓ 23.8 14,299 5

Index Scan using idx_gl_details_cid_property_id_post_month on gl_details gd_1 (cost=0.56..25,880.16 rows=602 width=99) (actual time=0.012..22.534 rows=14,299 loops=5)

  • Index Cond: ((cid = 14,181) AND (property_id = load_prop_1.property_id) AND (post_month >= '2019-01-01'::date) AND (post_month <= '2019-05-01'::date))
  • Filter: (gl_transaction_type_id <> ALL ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 21,206
62. 285.980 285.980 ↑ 1.0 1 71,495

Index Scan using idx_gl_headers_id on gl_headers gh_1 (cost=0.44..5.83 rows=1 width=102) (actual time=0.004..0.004 rows=1 loops=71,495)

  • Index Cond: (id = gd_1.gl_header_id)
  • Filter: ((is_template IS FALSE) AND (cid = 14,181) AND (gl_book_id = 103) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
  • Rows Removed by Filter: 0
63. 214.149 214.149 ↑ 1.0 1 71,383

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat_1 (cost=0.28..1.10 rows=1 width=77) (actual time=0.002..0.003 rows=1 loops=71,383)

  • Index Cond: (gl_account_id = gd_1.accrual_gl_account_id)
  • Filter: ((cid = 14,181) AND (grouping_gl_account_id = ANY ('{276755,277181,276723,282512,277994,282520,307023,307024,277182,276734,276746,276756,276757,276747,276758,276759,277856,305890,306562,276760,277858,276761,276762,305887,276763,276764,276765,276766,282511,276752,276744,276751,276767,276768,276769,276770,279436,282510,306688,306690,307032,276771,276772,276773,276774,276775,276776,276777,281803,276778,276779,281804,276780,276781,307058,307059,307035,307036,307037,307038,307039,307040,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,306552,306553,305894,305893,276795,281816,276796,281817,276797,281818,276798,281819,276799,281820,276800,281821,276801,281822,276802,306554,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,307041,307060,307042,276836,306932,276837,306996,306997,306998,306999,307025,276838,276839,276840,306544,306931,307027,276841,276842,276843,276844,276845,306545,306933,307026,307028,277861,276745,276846,276847,276848,276719,276849,276738,276750,279435,276754,278169,306551,276733,276851,276749,276852,276853,276854,276855,276856,276857,277823,276858,276859,276860,276861,276862,276863,276864,276865,276866,305856,307009,276867,276868,276869,276870,276871,276872,276873,276748,276874,276742,276876,276753,276878,276879,276880,307031,307000,307043,276881,307061,307044,307045,307046,307047,307048,307049,307050,277862,276882,307051,276740,276739,276730,307052,307053,276731,276883,276736,276735,276737,276884,306572,276885,276886,307003,276887,276888,276889,276890,276891,276741,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,306947,306949,306948,276720,277866,276743,307001,276728,307054,276985,276986,276987,276988,276989,276990,276991,276992,276993,276994,276995,276996,276997,276998,276999,277000,277001,277002,277003,277004,277005,277006,277007,307011,277008,282036,277009,277010,277011,277012,306567,277013,277014,277015,277016,277017,277868,277018,277019,277869,277179,277180,306560,307004,277020,277021,277022,277023,277024,277025,277026,277027,277870,277028,276722,277029,277871,277030,305849,306689,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,306694,307030,277111,276984,277112,282523,277113,277114,307029,281776,306954,281777,281778,281779,281780,281781,281782,281783,281784,281785,281786,281787,281788,281789,306955,281790,281791,281792,306956,281793,306957,281794,306958,305866,306566,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,306914,277175,277176,277177,305867,277178,306686}'::integer[])))
64. 214.130 214.149 ↑ 3.4 8 71,383

Materialize (cost=0.00..2.41 rows=27 width=24) (actual time=0.000..0.003 rows=8 loops=71,383)

65. 0.019 0.019 ↑ 1.3 21 1

Seq Scan on gl_transaction_types gtty_1 (cost=0.00..2.27 rows=27 width=24) (actual time=0.005..0.019 rows=21 loops=1)

66. 214.149 214.149 ↑ 1.0 1 71,383

Index Scan using pk_ap_allocations on ap_allocations aa (cost=0.43..0.55 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=71,383)

  • Index Cond: ((gh_1.cid = cid) AND (cid = 14,181) AND (gh_1.reference_id = id))
  • Filter: (gl_transaction_type_id = gh_1.gl_transaction_type_id)
67. 142.766 142.766 ↑ 1.0 1 71,383

Index Scan using idx_ap_details on ap_details ad_1 (cost=0.43..2.32 rows=1 width=60) (actual time=0.002..0.002 rows=1 loops=71,383)

  • Index Cond: (aa.credit_ap_detail_id = id)
  • Filter: ((cid = 14,181) AND (aa.cid = cid))
68. 214.149 214.149 ↑ 1.0 1 71,383

Index Scan using idx_ap_details on ap_details ad1 (cost=0.43..4.31 rows=1 width=60) (actual time=0.003..0.003 rows=1 loops=71,383)

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

Materialize (cost=0.00..25.03 rows=6 width=40) (actual time=0.000..0.000 rows=0 loops=71,383)

70. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on property_units_temp pu (cost=0.00..25.00 rows=6 width=40) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (cid = 14,181)
71. 0.000 0.000 ↓ 0.0 0 71,383

Index Scan using idx_id on property_buildings_temp pb (cost=0.28..0.30 rows=1 width=11) (actual time=0.000..0.000 rows=0 loops=71,383)

  • 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 = 14,181) AND (cid = gd_1.cid))
72. 142.766 142.766 ↑ 1.0 1 71,383

Index Scan using idx_ap_headers_id on ap_headers ah (cost=0.43..0.63 rows=1 width=60) (actual time=0.002..0.002 rows=1 loops=71,383)

  • Index Cond: (ad_1.ap_header_id = id)
  • Filter: ((ap_financial_status_type_id IS DISTINCT FROM 8) AND (cid = 14,181) AND (ad_1.cid = cid) AND (ad_1.gl_transaction_type_id = gl_transaction_type_id) AND (ad_1.post_month = post_month))
73. 0.000 0.000 ↓ 0.0 0 71,383

Index Scan using idx_ap_headers_id on ap_headers ah1 (cost=0.43..0.91 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=71,383)

  • Index Cond: (id = aa.lump_ap_header_id)
  • Filter: ((ap_financial_status_type_id IS DISTINCT FROM 8) AND (cid = 14,181) AND (cid = aa.cid))
74. 214.149 214.149 ↑ 1.0 1 71,383

Index Scan using idx_ap_headers_id on ap_headers ah2 (cost=0.43..0.49 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=71,383)

  • Index Cond: (ad1.ap_header_id = id)
  • Filter: ((ap_financial_status_type_id IS DISTINCT FROM 8) AND (ad1.cid = cid) AND (ad1.gl_transaction_type_id = gl_transaction_type_id) AND (ad1.post_month = post_month))
  • Rows Removed by Filter: 0
75. 0.000 0.000 ↓ 0.0 0 71,383

Index Scan using idx_lease_customers_id on lease_customers lc (cost=0.42..0.69 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=71,383)

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

Index Scan using idx_customers_id on customers cust (cost=0.43..0.82 rows=1 width=38) (actual time=0.000..0.000 rows=0 loops=71,383)

  • Index Cond: (id = lc.customer_id)
  • Filter: (cid = lc.cid)
77. 142.766 142.766 ↑ 1.0 1 71,383

Index Scan using idx_ap_payments_id on ap_payments ap_ref (cost=0.42..0.80 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=71,383)

  • Index Cond: (id = ah.ap_payment_id)
  • Filter: ((cid = 14,181) AND (cid = ah.cid))
78. 0.000 0.000 ↓ 0.0 0 71,383

Index Scan using idx_ap_payments_id on ap_payments ap (cost=0.42..0.80 rows=1 width=17) (actual time=0.000..0.000 rows=0 loops=71,383)

  • Index Cond: (id = ah1.ap_payment_id)
  • Filter: ((cid = 14,181) AND (cid = ah1.cid))
79. 142.766 142.766 ↑ 1.0 1 71,383

Index Scan using idx_ap_payees_id on ap_payees app (cost=0.29..0.32 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=71,383)

  • Index Cond: (id = COALESCE(ah.ap_payee_id, ah2.ap_payee_id))
  • Filter: (cid = COALESCE(ah.cid, ah2.cid))
80. 142.766 142.766 ↓ 0.0 0 71,383

Index Scan using idx_ar_deposits_id on ar_deposits ad_2 (cost=0.42..0.70 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=71,383)

  • Index Cond: (gh_1.reference_id = id)
  • Filter: ((cid = 14,181) AND (gh_1.gl_transaction_type_id = gl_transaction_type_id))
81. 0.125 1.341 ↓ 5.0 115 1

Subquery Scan on "*SELECT* 3" (cost=77.27..78.59 rows=23 width=644) (actual time=1.007..1.341 rows=115 loops=1)

82. 0.178 1.216 ↓ 5.0 115 1

GroupAggregate (cost=77.27..78.19 rows=23 width=560) (actual time=1.003..1.216 rows=115 loops=1)

  • 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
83. 0.214 1.038 ↓ 5.0 115 1

Sort (cost=77.27..77.32 rows=23 width=100) (actual time=0.993..1.038 rows=115 loops=1)

  • Sort 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
  • Sort Method: quicksort Memory: 41kB
84. 0.145 0.824 ↓ 5.0 115 1

Nested Loop (cost=0.70..76.75 rows=23 width=100) (actual time=0.053..0.824 rows=115 loops=1)

85. 0.101 0.219 ↓ 5.0 115 1

Nested Loop (cost=0.42..40.10 rows=23 width=43) (actual time=0.043..0.219 rows=115 loops=1)

  • Join Filter: (load_prop_2.property_id = bbt.property_id)
86. 0.010 0.038 ↓ 5.0 5 1

Nested Loop (cost=0.28..38.64 rows=1 width=39) (actual time=0.017..0.038 rows=5 loops=1)

87. 0.008 0.008 ↑ 1.0 5 1

Seq Scan on load_prop load_prop_2 (cost=0.00..1.05 rows=5 width=4) (actual time=0.005..0.008 rows=5 loops=1)

88. 0.020 0.020 ↑ 1.0 1 5

Index Scan using idx_properties_id on properties p (cost=0.28..7.50 rows=1 width=35) (actual time=0.004..0.004 rows=1 loops=5)

  • Index Cond: (id = load_prop_2.property_id)
  • Filter: (cid = 14,181)
89. 0.080 0.080 ↑ 1.7 23 5

Index Scan using idx_beg_bal_temp_pid on beg_bal_temp bbt (cost=0.14..0.99 rows=38 width=16) (actual time=0.005..0.016 rows=23 loops=5)

  • Index Cond: (property_id = p.id)
  • Filter: (cid = 14,181)
90. 0.460 0.460 ↑ 1.0 1 115

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat_2 (cost=0.28..1.58 rows=1 width=73) (actual time=0.003..0.004 rows=1 loops=115)

  • Index Cond: (gl_account_id = bbt.gl_account_id)
  • Filter: ((cid = 14,181) AND (grouping_gl_account_id = ANY ('{276755,277181,276723,282512,277994,282520,307023,307024,277182,276734,276746,276756,276757,276747,276758,276759,277856,305890,306562,276760,277858,276761,276762,305887,276763,276764,276765,276766,282511,276752,276744,276751,276767,276768,276769,276770,279436,282510,306688,306690,307032,276771,276772,276773,276774,276775,276776,276777,281803,276778,276779,281804,276780,276781,307058,307059,307035,307036,307037,307038,307039,307040,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,306552,306553,305894,305893,276795,281816,276796,281817,276797,281818,276798,281819,276799,281820,276800,281821,276801,281822,276802,306554,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,307041,307060,307042,276836,306932,276837,306996,306997,306998,306999,307025,276838,276839,276840,306544,306931,307027,276841,276842,276843,276844,276845,306545,306933,307026,307028,277861,276745,276846,276847,276848,276719,276849,276738,276750,279435,276754,278169,306551,276733,276851,276749,276852,276853,276854,276855,276856,276857,277823,276858,276859,276860,276861,276862,276863,276864,276865,276866,305856,307009,276867,276868,276869,276870,276871,276872,276873,276748,276874,276742,276876,276753,276878,276879,276880,307031,307000,307043,276881,307061,307044,307045,307046,307047,307048,307049,307050,277862,276882,307051,276740,276739,276730,307052,307053,276731,276883,276736,276735,276737,276884,306572,276885,276886,307003,276887,276888,276889,276890,276891,276741,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,306947,306949,306948,276720,277866,276743,307001,276728,307054,276985,276986,276987,276988,276989,276990,276991,276992,276993,276994,276995,276996,276997,276998,276999,277000,277001,277002,277003,277004,277005,277006,277007,307011,277008,282036,277009,277010,277011,277012,306567,277013,277014,277015,277016,277017,277868,277018,277019,277869,277179,277180,306560,307004,277020,277021,277022,277023,277024,277025,277026,277027,277870,277028,276722,277029,277871,277030,305849,306689,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,306694,307030,277111,276984,277112,282523,277113,277114,307029,281776,306954,281777,281778,281779,281780,281781,281782,281783,281784,281785,281786,281787,281788,281789,306955,281790,281791,281792,306956,281793,306957,281794,306958,305866,306566,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,306914,277175,277176,277177,305867,277178,306686}'::integer[])))