explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ubrV

Settings
# exclusive inclusive rows x rows loops node
1. 403.093 15,870.999 ↓ 849.9 169,984 1

GroupAggregate (cost=109,158.96..109,247.96 rows=200 width=1,586) (actual time=15,425.361..15,870.999 rows=169,984 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.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. 3,496.024 15,467.906 ↓ 269.5 172,500 1

Sort (cost=109,158.96..109,160.56 rows=640 width=1,554) (actual time=15,425.338..15,467.906 rows=172,500 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.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
  • Sort Method: external sort Disk: 67992kB
3. 39.414 11,971.882 ↓ 269.5 172,500 1

Subquery Scan on outer_details (cost=109,071.26..109,129.13 rows=640 width=1,554) (actual time=11,620.460..11,971.882 rows=172,500 loops=1)

  • Filter: (outer_details.hide_zero_beginning_balance_for_no_activities <> 1)
  • Rows Removed by Filter: 333
4. 281.687 11,932.468 ↓ 268.8 172,833 1

WindowAgg (cost=109,071.26..109,108.23 rows=643 width=1,590) (actual time=11,620.457..11,932.468 rows=172,833 loops=1)

5. 669.862 11,650.781 ↓ 268.8 172,833 1

Sort (cost=109,071.26..109,072.86 rows=643 width=1,362) (actual time=11,620.441..11,650.781 rows=172,833 loops=1)

  • Sort Key: details.property_id, details.gl_account
  • Sort Method: external merge Disk: 63072kB
6. 193.990 10,980.919 ↓ 268.8 172,833 1

WindowAgg (cost=109,015.54..109,041.26 rows=643 width=1,362) (actual time=10,753.483..10,980.919 rows=172,833 loops=1)

7. 605.802 10,786.929 ↓ 268.8 172,833 1

Sort (cost=109,015.54..109,017.15 rows=643 width=1,354) (actual time=10,753.472..10,786.929 rows=172,833 loops=1)

  • Sort Key: details.property_id, details.grouping_gl_account_id
  • Sort Method: external merge Disk: 61216kB
8. 54.075 10,181.127 ↓ 268.8 172,833 1

Subquery Scan on details (cost=1,855.65..108,985.55 rows=643 width=1,354) (actual time=4.278..10,181.127 rows=172,833 loops=1)

9. 19.069 10,127.052 ↓ 268.8 172,833 1

Append (cost=1,855.65..108,966.26 rows=643 width=1,390) (actual time=4.276..10,127.052 rows=172,833 loops=1)

10. 80.214 10,100.748 ↓ 519.8 171,547 1

Result (cost=1,855.65..108,766.29 rows=330 width=1,376) (actual time=4.276..10,100.748 rows=171,547 loops=1)

11. 16.847 10,020.534 ↓ 519.8 171,547 1

Append (cost=1,855.65..108,755.56 rows=330 width=1,348) (actual time=4.274..10,020.534 rows=171,547 loops=1)

12. 2,149.702 9,004.157 ↓ 2,540.2 154,952 1

Nested Loop Left Join (cost=1,855.65..86,590.09 rows=61 width=641) (actual time=4.273..9,004.157 rows=154,952 loops=1)

13. 120.775 6,699.503 ↓ 2,540.2 154,952 1

Nested Loop Left Join (cost=1,855.35..86,498.66 rows=61 width=591) (actual time=3.490..6,699.503 rows=154,952 loops=1)

14. 84.565 6,113.872 ↓ 2,540.2 154,952 1

Hash Left Join (cost=1,854.93..86,427.16 rows=61 width=540) (actual time=3.448..6,113.872 rows=154,952 loops=1)

  • Hash Cond: ((art1.cid = ac.cid) AND (art1.ar_code_id = ac.id))
15. 118.409 6,029.266 ↓ 2,540.2 154,952 1

Nested Loop Left Join (cost=1,847.18..86,418.56 rows=61 width=527) (actual time=3.391..6,029.266 rows=154,952 loops=1)

16. 139.875 5,755.905 ↓ 2,540.2 154,952 1

Nested Loop Left Join (cost=1,847.04..86,407.62 rows=61 width=513) (actual time=3.372..5,755.905 rows=154,952 loops=1)

  • Join Filter: (gh.cid = art1.cid)
17. 249.110 5,151.174 ↓ 2,540.2 154,952 1

Nested Loop Left Join (cost=1,846.60..86,357.20 rows=61 width=303) (actual time=3.359..5,151.174 rows=154,952 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{7,8,9,17}'::integer[]))
  • Rows Removed by Join Filter: 70644
18. 177.075 4,127.304 ↓ 2,540.2 154,952 1

Nested Loop Left Join (cost=472.22..2,454.13 rows=61 width=291) (actual time=3.279..4,127.304 rows=154,952 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{13,14,18,23,24}'::integer[]))
19. 63.061 1,316.045 ↓ 2,540.2 154,952 1

Hash Join (cost=471.78..2,405.14 rows=61 width=283) (actual time=3.255..1,316.045 rows=154,952 loops=1)

  • Hash Cond: (gh.gl_transaction_type_id = gtty.id)
20. 33.108 1,252.950 ↓ 2,540.2 154,952 1

Nested Loop (cost=468.10..2,401.23 rows=61 width=263) (actual time=3.198..1,252.950 rows=154,952 loops=1)

21. 66.138 290.130 ↓ 301.5 154,952 1

Hash Join (cost=467.66..1,320.29 rows=514 width=166) (actual time=2.755..290.130 rows=154,952 loops=1)

  • Hash Cond: (gd.accrual_gl_account_id = gat.gl_account_id)
22. 28.476 222.300 ↓ 194.3 156,046 1

Nested Loop (cost=0.56..834.76 rows=803 width=101) (actual time=1.043..222.300 rows=156,046 loops=1)

23. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on load_prop (cost=0.00..1.12 rows=4 width=25) (actual time=0.004..0.008 rows=4 loops=1)

24. 193.816 193.816 ↓ 194.1 39,012 4

Index Scan using idx_gl_details_cid_property_id_post_month on gl_details gd (cost=0.56..202.38 rows=201 width=80) (actual time=1.070..48.454 rows=39,012 loops=4)

  • Index Cond: ((cid = 14181) AND (property_id = load_prop.property_id) AND (property_id = ANY ('{503992,503993,503999,504008}'::integer[])) AND (post_month >= '07/01/2019'::date) AND (post_month <= '09/01/2019'::date))
  • Filter: (gl_transaction_type_id = ANY ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 4161
25. 0.177 1.692 ↑ 1.0 571 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 70kB
26. 1.515 1.515 ↑ 1.0 571 1

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

  • 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[])))
  • Rows Removed by Filter: 18
27. 929.712 929.712 ↑ 1.0 1 154,952

Index Scan using pk_gl_headers on gl_headers gh (cost=0.43..2.10 rows=1 width=101) (actual time=0.006..0.006 rows=1 loops=154,952)

  • 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[])))
28. 0.011 0.034 ↑ 1.0 27 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
29. 0.023 0.023 ↑ 1.0 27 1

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

30. 2,634.184 2,634.184 ↓ 0.0 0 154,952

Index Scan using pk_ar_allocations on ar_allocations ara (cost=0.43..0.77 rows=1 width=16) (actual time=0.017..0.017 rows=0 loops=154,952)

  • Index Cond: ((cid = gh.cid) AND (cid = 14181) AND (id = gh.reference_id))
31. 154.952 774.760 ↑ 1.0 1 154,952

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

  • Recheck Cond: (((cid = 14181) AND (id = gh.reference_id)) OR ((cid = 14181) AND (id = ara.credit_ar_transaction_id)))
  • Filter: (gh.cid = cid)
  • Heap Blocks: exact=155322
32. 154.952 619.808 ↓ 0.0 0 154,952

BitmapOr (cost=1,374.39..1,374.39 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=154,952)

33. 309.904 309.904 ↑ 1.0 1 154,952

Bitmap Index Scan on pk_ar_transactions (cost=0.00..0.49 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=154,952)

  • Index Cond: ((cid = 14181) AND (id = gh.reference_id))
34. 154.952 154.952 ↓ 0.0 0 154,952

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

  • Index Cond: ((cid = 14181) AND (id = ara.credit_ar_transaction_id))
35. 464.856 464.856 ↑ 1.0 1 154,952

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

  • Index Cond: ((cid = 14181) AND (id = COALESCE(ara.charge_ar_transaction_id, art.id)))
36. 154.952 154.952 ↑ 1.0 1 154,952

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

  • Index Cond: (art1.ar_trigger_id = id)
37. 0.020 0.041 ↑ 1.0 100 1

Hash (cost=4.25..4.25 rows=100 width=25) (actual time=0.041..0.041 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
38. 0.021 0.021 ↑ 1.0 100 1

Seq Scan on ar_codes_temp ac (cost=0.00..4.25 rows=100 width=25) (actual time=0.008..0.021 rows=100 loops=1)

  • Filter: (cid = 14181)
39. 464.856 464.856 ↑ 1.0 1 154,952

Index Scan using pk_cached_leases on cached_leases cl (cost=0.42..1.17 rows=1 width=63) (actual time=0.003..0.003 rows=1 loops=154,952)

  • Index Cond: ((cid = gd.cid) AND (cid = 14181) AND (id = gd.lease_id))
40. 154.952 154.952 ↓ 0.0 0 154,952

Index Scan using idx_ar_deposits_id on ar_deposits ad (cost=0.29..0.59 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=154,952)

  • Index Cond: (gh.reference_id = id)
  • Filter: ((cid = 14181) AND (gh.gl_transaction_type_id = gl_transaction_type_id))
41. 5.522 999.530 ↓ 61.7 16,595 1

Subquery Scan on *SELECT* 2 (cost=569.27..22,163.64 rows=269 width=519) (actual time=2.366..999.530 rows=16,595 loops=1)

42. 98.560 994.008 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=569.27..22,155.57 rows=269 width=519) (actual time=2.364..994.008 rows=16,595 loops=1)

43. 10.039 862.258 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=568.86..21,833.05 rows=269 width=481) (actual time=2.315..862.258 rows=16,595 loops=1)

44. 9.947 852.219 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=568.44..21,655.48 rows=269 width=476) (actual time=2.310..852.219 rows=16,595 loops=1)

45. 15.696 809.082 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=568.01..21,477.90 rows=269 width=467) (actual time=1.823..809.082 rows=16,595 loops=1)

46. 12.630 793.386 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=567.59..21,304.94 rows=269 width=438) (actual time=1.819..793.386 rows=16,595 loops=1)

47. 8.991 764.161 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=567.16..21,115.30 rows=269 width=430) (actual time=1.815..764.161 rows=16,595 loops=1)

48. 9.312 705.385 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=566.73..20,974.36 rows=269 width=434) (actual time=1.786..705.385 rows=16,595 loops=1)

49. 15.441 696.073 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=566.31..20,759.85 rows=269 width=430) (actual time=1.782..696.073 rows=16,595 loops=1)

50. 11.757 664.037 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=565.88..20,592.17 rows=269 width=390) (actual time=1.759..664.037 rows=16,595 loops=1)

51. 8.391 652.280 ↓ 61.7 16,595 1

Hash Left Join (cost=565.60..20,498.01 rows=269 width=407) (actual time=1.751..652.280 rows=16,595 loops=1)

  • 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))
52. 7.987 643.506 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=473.08..20,395.06 rows=269 width=415) (actual time=1.359..643.506 rows=16,595 loops=1)

53. 5.776 502.759 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=472.65..20,014.08 rows=269 width=367) (actual time=1.331..502.759 rows=16,595 loops=1)

54. 12.587 447.198 ↓ 61.7 16,595 1

Nested Loop Left Join (cost=472.21..19,692.61 rows=269 width=315) (actual time=1.300..447.198 rows=16,595 loops=1)

  • Join Filter: (gh_1.gl_transaction_type_id = ANY ('{4,5}'::integer[]))
55. 6.613 318.446 ↓ 61.7 16,595 1

Hash Join (cost=471.78..19,541.25 rows=269 width=303) (actual time=1.254..318.446 rows=16,595 loops=1)

  • Hash Cond: (gh_1.gl_transaction_type_id = gtty_1.id)
56. 11.858 311.811 ↓ 61.7 16,595 1

Nested Loop (cost=468.10..19,536.54 rows=269 width=279) (actual time=1.221..311.811 rows=16,595 loops=1)

57. 7.143 133.593 ↓ 7.3 16,636 1

Hash Join (cost=467.66..16,107.51 rows=2,265 width=182) (actual time=1.200..133.593 rows=16,636 loops=1)

  • Hash Cond: (gd_1.accrual_gl_account_id = gat_1.gl_account_id)
58. 3.021 125.386 ↓ 4.7 16,644 1

Nested Loop (cost=0.56..15,559.19 rows=3,539 width=117) (actual time=0.128..125.386 rows=16,644 loops=1)

59. 0.009 0.009 ↑ 1.0 4 1

Seq Scan on load_prop load_prop_1 (cost=0.00..1.12 rows=4 width=25) (actual time=0.004..0.009 rows=4 loops=1)

60. 122.356 122.356 ↓ 4.7 4,161 4

Index Scan using idx_gl_details_cid_property_id_post_month_accrual_gl_account_id on gl_details gd_1 (cost=0.56..3,862.97 rows=885 width=96) (actual time=0.691..30.589 rows=4,161 loops=4)

  • Index Cond: ((cid = 14181) AND (property_id = load_prop_1.property_id) AND (post_month >= '07/01/2019'::date) AND (post_month <= '09/01/2019'::date))
  • Filter: (gl_transaction_type_id <> ALL ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 39012
61. 0.126 1.064 ↑ 1.0 571 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 70kB
62. 0.938 0.938 ↑ 1.0 571 1

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

  • 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[])))
  • Rows Removed by Filter: 18
63. 166.360 166.360 ↑ 1.0 1 16,636

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

  • 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[])))
  • Rows Removed by Filter: 0
64. 0.007 0.022 ↑ 1.0 27 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
65. 0.015 0.015 ↑ 1.0 27 1

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

66. 116.165 116.165 ↓ 0.0 0 16,595

Index Scan using pk_ap_allocations on ap_allocations aa (cost=0.43..0.53 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=16,595)

  • 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)
67. 49.785 49.785 ↓ 0.0 0 16,595

Index Scan using idx_ap_details on ap_details ad_1 (cost=0.43..1.17 rows=1 width=60) (actual time=0.003..0.003 rows=0 loops=16,595)

  • Index Cond: (aa.credit_ap_detail_id = id)
  • Filter: ((cid = 14181) AND (aa.cid = cid))
68. 132.760 132.760 ↑ 1.0 1 16,595

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

  • Index Cond: (id = COALESCE(gd_1.ap_detail_id, aa.charge_ap_detail_id))
  • Filter: (cid = COALESCE(gd_1.cid, aa.cid))
69. 0.181 0.383 ↑ 1.0 1,267 1

Hash (cost=48.18..48.18 rows=1,267 width=12) (actual time=0.383..0.383 rows=1,267 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 75kB
70. 0.202 0.202 ↑ 1.0 1,267 1

Seq Scan on property_units_temp pu (cost=0.00..48.18 rows=1,267 width=12) (actual time=0.010..0.202 rows=1,267 loops=1)

  • Filter: (cid = 14181)
71. 0.000 0.000 ↓ 0.0 0 16,595

Index Scan using idx_id on property_buildings_temp pb (cost=0.28..0.32 rows=1 width=11) (actual time=0.000..0.000 rows=0 loops=16,595)

  • 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))
72. 16.595 16.595 ↓ 0.0 0 16,595

Index Scan using idx_ap_headers on ap_headers ah (cost=0.43..0.59 rows=1 width=60) (actual time=0.001..0.001 rows=0 loops=16,595)

  • 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))
73. 0.000 0.000 ↓ 0.0 0 16,595

Index Scan using idx_ap_headers on ap_headers ah1 (cost=0.43..0.77 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=16,595)

  • Index Cond: (id = aa.lump_ap_header_id)
  • Filter: ((cid = 14181) AND (cid = aa.cid))
74. 49.785 49.785 ↑ 1.0 1 16,595

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

  • 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))
75. 16.595 16.595 ↓ 0.0 0 16,595

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

  • Index Cond: ((cid = COALESCE(ah2.cid, ah.cid)) AND (id = COALESCE(ah2.lease_customer_id, ah.lease_customer_id)))
76. 0.000 0.000 ↓ 0.0 0 16,595

Index Scan using idx_customers_id on customers cust (cost=0.43..0.61 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=16,595)

  • Index Cond: (id = lc.customer_id)
  • Filter: (cid = lc.cid)
  • Rows Removed by Filter: 0
77. 33.190 33.190 ↓ 0.0 0 16,595

Index Scan using idx_ap_payments_id on ap_payments ap_ref (cost=0.42..0.63 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=16,595)

  • Index Cond: (id = ah.ap_payment_id)
  • Filter: ((cid = 14181) AND (cid = ah.cid))
78. 0.000 0.000 ↓ 0.0 0 16,595

Index Scan using idx_ap_payments_id on ap_payments ap (cost=0.42..0.63 rows=1 width=17) (actual time=0.000..0.000 rows=0 loops=16,595)

  • Index Cond: (id = ah1.ap_payment_id)
  • Filter: ((cid = 14181) AND (cid = ah1.cid))
79. 33.190 33.190 ↑ 1.0 1 16,595

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

  • Index Cond: (id = COALESCE(ah.ap_payee_id, ah2.ap_payee_id))
  • Filter: (cid = COALESCE(ah.cid, ah2.cid))
80. 0.545 7.235 ↓ 4.1 1,286 1

Subquery Scan on *SELECT* 3 (cost=177.28..199.97 rows=313 width=579) (actual time=5.863..7.235 rows=1,286 loops=1)

81. 1.843 6.690 ↓ 4.1 1,286 1

HashAggregate (cost=177.28..188.24 rows=313 width=495) (actual time=5.860..6.690 rows=1,286 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
82. 0.311 4.847 ↓ 4.1 1,290 1

Merge Join (cost=170.19..170.24 rows=313 width=101) (actual time=0.135..4.847 rows=1,290 loops=1)

  • Merge Cond: (p.id = load_prop_2.property_id)
83. 1.114 4.427 ↓ 17.4 1,290 1

Nested Loop (cost=49.47..199.24 rows=74 width=105) (actual time=0.120..4.427 rows=1,290 loops=1)

84. 0.239 0.733 ↓ 17.0 1,290 1

Merge Join (cost=49.19..118.01 rows=76 width=48) (actual time=0.107..0.733 rows=1,290 loops=1)

  • Merge Cond: (p.id = bbt.property_id)
85. 0.177 0.177 ↑ 2.6 25 1

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 time=0.020..0.177 rows=25 loops=1)

  • Index Cond: (cid = 14181)
86. 0.317 0.317 ↑ 1.0 1,290 1

Index Scan using idx_beg_bal_temp_pid on beg_bal_temp bbt (cost=0.28..62.65 rows=1,290 width=18) (actual time=0.028..0.317 rows=1,290 loops=1)

  • Filter: (cid = 14181)
87. 2.580 2.580 ↑ 1.0 1 1,290

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat_2 (cost=0.28..1.04 rows=1 width=73) (actual time=0.002..0.002 rows=1 loops=1,290)

  • 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[])))
88. 0.105 0.109 ↓ 241.8 967 1

Sort (cost=1.16..1.17 rows=4 width=4) (actual time=0.012..0.109 rows=967 loops=1)

  • Sort Key: load_prop_2.property_id
  • Sort Method: quicksort Memory: 25kB
89. 0.004 0.004 ↑ 1.0 4 1

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

Planning time : 66.560 ms
Execution time : 15,945.561 ms