explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5Gx

Settings
# exclusive inclusive rows x rows loops node
1. 285.778 13,677.052 ↓ 56,378.5 112,757 1

GroupAggregate (cost=38,456.64..38,456.91 rows=2 width=1,394) (actual time=13,342.670..13,677.052 rows=112,757 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.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
2. 979.122 13,391.274 ↓ 57,576.0 115,152 1

Sort (cost=38,456.64..38,456.65 rows=2 width=1,362) (actual time=13,342.650..13,391.274 rows=115,152 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.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
  • Sort Method: quicksort Memory: 56,707kB
3. 101.715 12,412.152 ↓ 57,576.0 115,152 1

Subquery Scan on outer_details (cost=38,456.52..38,456.63 rows=2 width=1,362) (actual time=12,069.462..12,412.152 rows=115,152 loops=1)

  • Filter: (outer_details.hide_zero_beginning_balance_for_no_activities <> 1)
4. 192.051 12,310.437 ↓ 38,384.0 115,152 1

WindowAgg (cost=38,456.52..38,456.59 rows=3 width=1,398) (actual time=12,069.459..12,310.437 rows=115,152 loops=1)

5. 269.964 12,118.386 ↓ 38,384.0 115,152 1

Sort (cost=38,456.52..38,456.53 rows=3 width=1,354) (actual time=12,069.430..12,118.386 rows=115,152 loops=1)

  • Sort Key: details.property_id, details.grouping_gl_account_id
  • Sort Method: quicksort Memory: 53,469kB
6. 129.420 11,848.422 ↓ 38,384.0 115,152 1

Subquery Scan on details (cost=201.45..38,456.49 rows=3 width=1,354) (actual time=1.333..11,848.422 rows=115,152 loops=1)

7. 91.923 11,719.002 ↓ 38,384.0 115,152 1

Append (cost=201.45..38,456.46 rows=3 width=1,390) (actual time=1.332..11,719.002 rows=115,152 loops=1)

8. 145.583 11,627.047 ↓ 57,576.0 115,152 1

Result (cost=201.45..38,424.78 rows=2 width=1,376) (actual time=1.331..11,627.047 rows=115,152 loops=1)

9. 98.773 11,481.464 ↓ 57,576.0 115,152 1

Append (cost=201.45..38,424.76 rows=2 width=1,348) (actual time=1.329..11,481.464 rows=115,152 loops=1)

10. 2,838.457 7,038.247 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=201.45..633.92 rows=1 width=1,143) (actual time=1.328..7,038.247 rows=68,584 loops=1)

11. 165.089 4,062.622 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=201.03..631.14 rows=1 width=1,383) (actual time=0.162..4,062.622 rows=68,584 loops=1)

12. 184.252 3,691.781 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=200.60..623.64 rows=1 width=1,335) (actual time=0.148..3,691.781 rows=68,584 loops=1)

13. 99.511 3,370.361 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=200.31..623.29 rows=1 width=1,017) (actual time=0.137..3,370.361 rows=68,584 loops=1)

14. 134.730 3,133.682 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=200.17..623.13 rows=1 width=1,003) (actual time=0.128..3,133.682 rows=68,584 loops=1)

  • Join Filter: (gh.cid = art1.cid)
15. 233.121 2,793.200 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=199.73..619.11 rows=1 width=784) (actual time=0.118..2,793.200 rows=68,584 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{7,8,9,17}'::integer[]))
  • Rows Removed by Join Filter: 26,762
16. 140.212 2,011.407 ↓ 68,584.0 68,584 1

Nested Loop Left Join (cost=1.71..417.06 rows=1 width=772) (actual time=0.100..2,011.407 rows=68,584 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{13,14,18,23,24}'::integer[]))
17. 384.475 1,665.443 ↓ 68,584.0 68,584 1

Nested Loop (cost=1.28..409.65 rows=1 width=764) (actual time=0.087..1,665.443 rows=68,584 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = gtty.id)
  • Rows Removed by Join Filter: 581,784
18. 100.140 938.048 ↓ 68,584.0 68,584 1

Nested Loop (cost=1.28..407.04 rows=1 width=744) (actual time=0.081..938.048 rows=68,584 loops=1)

19. 167.030 563.572 ↓ 5,715.3 68,584 1

Nested Loop (cost=0.84..306.59 rows=12 width=648) (actual time=0.066..563.572 rows=68,584 loops=1)

20. 73.913 190.022 ↓ 2,294.7 68,840 1

Nested Loop (cost=0.56..296.89 rows=30 width=579) (actual time=0.056..190.022 rows=68,840 loops=1)

21. 0.009 0.009 ↑ 1.0 6 1

Seq Scan on load_prop (cost=0.00..1.06 rows=6 width=515) (actual time=0.004..0.009 rows=6 loops=1)

22. 116.100 116.100 ↓ 2,294.6 11,473 6

Index Scan using idx_gl_details_cid_property_id_post_month on gl_details gd (cost=0.56..49.26 rows=5 width=68) (actual time=0.243..19.350 rows=11,473 loops=6)

  • Index Cond: ((cid = 15,667) AND (property_id = load_prop.property_id) AND (property_id = ANY ('{640825,640826,640827,640828,640829,640830}'::integer[])) AND (post_month >= '2018-01-01'::date) AND (post_month <= '2020-06-01'::date))
  • Filter: (gl_transaction_type_id = ANY ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 7,896
23. 206.520 206.520 ↑ 1.0 1 68,840

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat (cost=0.28..0.31 rows=1 width=81) (actual time=0.003..0.003 rows=1 loops=68,840)

  • Index Cond: (gl_account_id = gd.accrual_gl_account_id)
  • Filter: (cid = 15,667)
24. 274.336 274.336 ↑ 1.0 1 68,584

Index Scan using idx_gl_headers_id on gl_headers gh (cost=0.44..8.37 rows=1 width=100) (actual time=0.004..0.004 rows=1 loops=68,584)

  • Index Cond: (id = gd.gl_header_id)
  • Filter: ((NOT is_template) AND (cid = 15,667) AND (gl_book_id = 3,683) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
25. 342.920 342.920 ↑ 3.0 9 68,584

Seq Scan on gl_transaction_types gtty (cost=0.00..2.27 rows=27 width=24) (actual time=0.001..0.005 rows=9 loops=68,584)

26. 205.752 205.752 ↓ 0.0 0 68,584

Index Scan using pk_ar_allocations on ar_allocations ara (cost=0.43..7.39 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=68,584)

  • Index Cond: ((cid = gh.cid) AND (cid = 15,667) AND (id = gh.reference_id))
27. 137.168 548.672 ↑ 1.0 1 68,584

Bitmap Heap Scan on ar_transactions art (cost=198.02..202.04 rows=1 width=20) (actual time=0.008..0.008 rows=1 loops=68,584)

  • Recheck Cond: (((cid = 15,667) AND (id = gh.reference_id)) OR ((cid = 15,667) AND (id = ara.credit_ar_transaction_id)))
  • Filter: (gh.cid = cid)
  • Heap Blocks: exact=68,584
28. 137.168 411.504 ↓ 0.0 0 68,584

BitmapOr (cost=198.02..198.02 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=68,584)

29. 205.752 205.752 ↑ 1.0 1 68,584

Bitmap Index Scan on pk_ar_transactions (cost=0.00..3.64 rows=1 width=0) (actual time=0.003..0.003 rows=1 loops=68,584)

  • Index Cond: ((cid = 15,667) AND (id = gh.reference_id))
30. 68.584 68.584 ↓ 0.0 0 68,584

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

  • Index Cond: ((cid = 15,667) AND (id = ara.credit_ar_transaction_id))
31. 205.752 205.752 ↑ 1.0 1 68,584

Index Scan using pk_ar_transactions on ar_transactions art1 (cost=0.44..4.00 rows=1 width=227) (actual time=0.003..0.003 rows=1 loops=68,584)

  • Index Cond: ((cid = 15,667) AND (id = COALESCE(ara.charge_ar_transaction_id, art.id)))
32. 137.168 137.168 ↑ 1.0 1 68,584

Index Scan using pk_ar_triggers on ar_triggers att (cost=0.14..0.16 rows=1 width=18) (actual time=0.002..0.002 rows=1 loops=68,584)

  • Index Cond: (art1.ar_trigger_id = id)
33. 137.168 137.168 ↑ 1.0 1 68,584

Index Scan using idx_ar_codes on ar_codes ac (cost=0.29..0.34 rows=1 width=330) (actual time=0.002..0.002 rows=1 loops=68,584)

  • Index Cond: (id = art1.ar_code_id)
  • Filter: ((cid = 15,667) AND (cid = art1.cid))
34. 205.752 205.752 ↑ 1.0 1 68,584

Index Scan using pk_cached_leases on cached_leases cl (cost=0.43..7.49 rows=1 width=60) (actual time=0.003..0.003 rows=1 loops=68,584)

  • Index Cond: ((cid = gd.cid) AND (cid = 15,667) AND (id = gd.lease_id))
35. 137.168 137.168 ↓ 0.0 0 68,584

Index Scan using idx_ar_deposits_id on ar_deposits ad (cost=0.42..1.39 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=68,584)

  • Index Cond: (gh.reference_id = id)
  • Filter: ((cid = 15,667) AND (gh.gl_transaction_type_id = gl_transaction_type_id))
36. 55.515 4,344.444 ↓ 46,568.0 46,568 1

Subquery Scan on "*SELECT* 2" (cost=29.77..37,790.83 rows=1 width=1,013) (actual time=0.892..4,344.444 rows=46,568 loops=1)

37. 671.323 4,288.929 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=29.77..37,790.82 rows=1 width=1,013) (actual time=0.889..4,288.929 rows=46,568 loops=1)

38. 105.204 3,524.470 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=29.35..37,787.73 rows=1 width=1,339) (actual time=0.853..3,524.470 rows=46,568 loops=1)

39. 102.476 3,326.130 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=28.93..37,786.98 rows=1 width=1,328) (actual time=0.846..3,326.130 rows=46,568 loops=1)

40. 109.489 3,223.654 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=28.51..37,784.21 rows=1 width=1,323) (actual time=0.841..3,223.654 rows=46,568 loops=1)

41. 103.112 3,067.597 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=28.08..37,781.44 rows=1 width=1,314) (actual time=0.835..3,067.597 rows=46,568 loops=1)

42. 109.241 2,964.485 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=27.65..37,780.79 rows=1 width=1,287) (actual time=0.830..2,964.485 rows=46,568 loops=1)

43. 71.694 2,855.244 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=27.22..37,777.38 rows=1 width=1,279) (actual time=0.823..2,855.244 rows=46,568 loops=1)

44. 104.094 2,643.846 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=26.79..37,776.84 rows=1 width=1,283) (actual time=0.818..2,643.846 rows=46,568 loops=1)

45. 78.151 2,539.752 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=26.36..37,773.71 rows=1 width=1,279) (actual time=0.814..2,539.752 rows=46,568 loops=1)

46. 109.216 2,368.465 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=25.94..37,771.38 rows=1 width=1,241) (actual time=0.806..2,368.465 rows=46,568 loops=1)

47. 115.392 2,259.249 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=25.65..37,771.06 rows=1 width=1,069) (actual time=0.800..2,259.249 rows=46,568 loops=1)

48. 78.724 2,143.857 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=25.23..37,770.31 rows=1 width=874) (actual time=0.794..2,143.857 rows=46,568 loops=1)

49. 76.287 1,925.429 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=24.80..37,766.28 rows=1 width=837) (actual time=0.788..1,925.429 rows=46,568 loops=1)

50. 92.643 1,756.006 ↓ 46,568.0 46,568 1

Nested Loop Left Join (cost=24.37..37,762.24 rows=1 width=796) (actual time=0.782..1,756.006 rows=46,568 loops=1)

  • Join Filter: (gh_1.gl_transaction_type_id = ANY ('{4,5}'::integer[]))
51. 603.109 1,523.659 ↓ 46,568.0 46,568 1

Nested Loop (cost=23.94..37,758.02 rows=1 width=784) (actual time=0.776..1,523.659 rows=46,568 loops=1)

  • Join Filter: (gh_1.gl_transaction_type_id = gtty_1.id)
  • Rows Removed by Join Filter: 1,210,768
52. 0.066 0.066 ↑ 1.0 27 1

Index Scan using pk_gl_transaction_types on gl_transaction_types gtty_1 (cost=0.14..16.37 rows=27 width=24) (actual time=0.005..0.066 rows=27 loops=1)

53. 537.843 920.484 ↓ 46,568.0 46,568 27

Materialize (cost=23.80..37,741.25 rows=1 width=760) (actual time=0.025..34.092 rows=46,568 loops=27)

54. 67.698 382.641 ↓ 46,568.0 46,568 1

Nested Loop (cost=23.80..37,741.25 rows=1 width=760) (actual time=0.651..382.641 rows=46,568 loops=1)

55. 50.457 173.496 ↓ 93.9 47,149 1

Hash Join (cost=23.37..34,679.44 rows=502 width=664) (actual time=0.640..173.496 rows=47,149 loops=1)

  • Hash Cond: (gd_1.accrual_gl_account_id = gat_1.gl_account_id)
56. 44.576 122.431 ↓ 36.2 47,375 1

Nested Loop (cost=0.56..34,646.71 rows=1,309 width=595) (actual time=0.019..122.431 rows=47,375 loops=1)

57. 0.011 0.011 ↑ 1.0 6 1

Seq Scan on load_prop load_prop_1 (cost=0.00..1.06 rows=6 width=515) (actual time=0.004..0.011 rows=6 loops=1)

58. 77.844 77.844 ↓ 36.2 7,896 6

Index Scan using idx_gl_details_cid_property_id_post_month on gl_details gd_1 (cost=0.56..5,772.10 rows=218 width=84) (actual time=0.014..12.974 rows=7,896 loops=6)

  • Index Cond: ((cid = 15,667) AND (property_id = load_prop_1.property_id) AND (post_month >= '2018-01-01'::date) AND (post_month <= '2020-06-01'::date))
  • Filter: (gl_transaction_type_id <> ALL ('{13,14,18,23,24,7,8,9,17}'::integer[]))
  • Rows Removed by Filter: 11,473
59. 0.312 0.608 ↑ 1.0 552 1

Hash (cost=15.90..15.90 rows=552 width=81) (actual time=0.608..0.608 rows=552 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 71kB
60. 0.296 0.296 ↑ 1.0 552 1

Seq Scan on gat_temp gat_1 (cost=0.00..15.90 rows=552 width=81) (actual time=0.005..0.296 rows=552 loops=1)

  • Filter: (cid = 15,667)
61. 141.447 141.447 ↑ 1.0 1 47,149

Index Scan using idx_gl_headers_id on gl_headers gh_1 (cost=0.44..6.10 rows=1 width=100) (actual time=0.003..0.003 rows=1 loops=47,149)

  • Index Cond: (id = gd_1.gl_header_id)
  • Filter: ((is_template IS FALSE) AND (cid = 15,667) AND (gl_book_id = 3,683) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
  • Rows Removed by Filter: 0
62. 139.704 139.704 ↓ 0.0 0 46,568

Index Scan using pk_ap_allocations on ap_allocations aa (cost=0.43..4.21 rows=1 width=24) (actual time=0.003..0.003 rows=0 loops=46,568)

  • Index Cond: ((gh_1.cid = cid) AND (cid = 15,667) AND (gh_1.reference_id = id))
  • Filter: (gl_transaction_type_id = gh_1.gl_transaction_type_id)
63. 93.136 93.136 ↓ 0.0 0 46,568

Index Scan using idx_ap_details on ap_details ad_1 (cost=0.43..4.03 rows=1 width=49) (actual time=0.002..0.002 rows=0 loops=46,568)

  • Index Cond: (aa.credit_ap_detail_id = id)
  • Filter: ((cid = 15,667) AND (aa.cid = cid))
64. 139.704 139.704 ↑ 1.0 1 46,568

Index Scan using idx_ap_details on ap_details ad1 (cost=0.43..4.02 rows=1 width=49) (actual time=0.003..0.003 rows=1 loops=46,568)

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

Index Scan using pk_property_units on property_units pu (cost=0.42..0.75 rows=1 width=215) (actual time=0.000..0.000 rows=0 loops=46,568)

  • Index Cond: ((cid = gd_1.cid) AND (cid = 15,667) AND (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))
66. 0.000 0.000 ↓ 0.0 0 46,568

Index Scan using idx_property_buildings_id on property_buildings pb (cost=0.29..0.31 rows=1 width=200) (actual time=0.000..0.000 rows=0 loops=46,568)

  • 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 = 15,667) AND (cid = gd_1.cid))
67. 93.136 93.136 ↓ 0.0 0 46,568

Index Scan using idx_ap_headers_id on ap_headers ah (cost=0.43..2.31 rows=1 width=58) (actual time=0.002..0.002 rows=0 loops=46,568)

  • Index Cond: (ad_1.ap_header_id = id)
  • Filter: ((ap_financial_status_type_id IS DISTINCT FROM 8) AND (cid = 15,667) AND (ad_1.cid = cid) AND (ad_1.gl_transaction_type_id = gl_transaction_type_id) AND (ad_1.post_month = post_month))
  • Rows Removed by Filter: 0
68. 0.000 0.000 ↓ 0.0 0 46,568

Index Scan using idx_ap_headers_id on ap_headers ah1 (cost=0.43..3.12 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=46,568)

  • Index Cond: (id = aa.lump_ap_header_id)
  • Filter: ((ap_financial_status_type_id IS DISTINCT FROM 8) AND (cid = 15,667) AND (cid = aa.cid))
69. 139.704 139.704 ↑ 1.0 1 46,568

Index Scan using idx_ap_headers_id on ap_headers ah2 (cost=0.43..0.52 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=46,568)

  • 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
70. 0.000 0.000 ↓ 0.0 0 46,568

Index Scan using idx_lease_customers_id on lease_customers lc (cost=0.43..3.40 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=46,568)

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

Index Scan using idx_customers_id on customers cust (cost=0.43..0.64 rows=1 width=39) (actual time=0.000..0.000 rows=0 loops=46,568)

  • Index Cond: (id = lc.customer_id)
  • Filter: (cid = lc.cid)
72. 46.568 46.568 ↓ 0.0 0 46,568

Index Scan using idx_ap_payments_id on ap_payments ap_ref (cost=0.43..2.76 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=46,568)

  • Index Cond: (id = ah.ap_payment_id)
  • Filter: ((cid = 15,667) AND (cid = ah.cid))
73. 0.000 0.000 ↓ 0.0 0 46,568

Index Scan using idx_ap_payments_id on ap_payments ap (cost=0.43..2.76 rows=1 width=17) (actual time=0.000..0.000 rows=0 loops=46,568)

  • Index Cond: (id = ah1.ap_payment_id)
  • Filter: ((cid = 15,667) AND (cid = ah1.cid))
74. 93.136 93.136 ↑ 1.0 1 46,568

Index Scan using idx_ap_payees_id on ap_payees app (cost=0.42..0.74 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=46,568)

  • Index Cond: (id = COALESCE(ah.ap_payee_id, ah2.ap_payee_id))
  • Filter: (cid = COALESCE(ah.cid, ah2.cid))
75. 93.136 93.136 ↓ 0.0 0 46,568

Index Scan using idx_ar_deposits_id on ar_deposits ad_2 (cost=0.42..1.39 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=46,568)

  • Index Cond: (gh_1.reference_id = id)
  • Filter: ((cid = 15,667) AND (gh_1.gl_transaction_type_id = gl_transaction_type_id))
76. 0.002 0.032 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 3" (cost=31.62..31.68 rows=1 width=1,068) (actual time=0.031..0.032 rows=0 loops=1)

77. 0.001 0.030 ↓ 0.0 0 1

GroupAggregate (cost=31.62..31.67 rows=1 width=984) (actual time=0.030..0.030 rows=0 loops=1)

  • Group Key: load_prop_2.property_id, load_prop_2.property_name, load_prop_2.lookup_code, gat_2.grouping_gl_account_id, gat_2.formatted_account_number, gat_2.name, gat_2.gl_account
78. 0.018 0.029 ↓ 0.0 0 1

Sort (cost=31.62..31.63 rows=1 width=616) (actual time=0.028..0.029 rows=0 loops=1)

  • Sort Key: load_prop_2.property_id, load_prop_2.property_name, load_prop_2.lookup_code, gat_2.grouping_gl_account_id, gat_2.formatted_account_number, gat_2.name, gat_2.gl_account
  • Sort Method: quicksort Memory: 25kB
79. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=1.42..31.61 rows=1 width=616) (actual time=0.010..0.011 rows=0 loops=1)

80. 0.002 0.010 ↓ 0.0 0 1

Hash Join (cost=1.15..25.31 rows=1 width=555) (actual time=0.009..0.010 rows=0 loops=1)

  • Hash Cond: (bbt.property_id = load_prop_2.property_id)
81. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on beg_bal_temp bbt (cost=0.00..24.12 rows=6 width=44) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: (cid = 15,667)
82. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.07..1.07 rows=6 width=519) (never executed)

83. 0.000 0.000 ↓ 0.0 0

Seq Scan on load_prop load_prop_2 (cost=0.00..1.07 rows=6 width=519) (never executed)

  • Filter: (cid = 15,667)
84. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_temp_gat_gl_account_id on gat_temp gat_2 (cost=0.28..6.30 rows=1 width=77) (never executed)

  • Index Cond: (gl_account_id = bbt.gl_account_id)
  • Filter: (cid = 15,667)
Planning time : 26.765 ms