explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J6Le

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 63.875 ↓ 6.2 25 1

GroupAggregate (cost=873.43..873.56 rows=4 width=125) (actual time=63.857..63.875 rows=25 loops=1)

  • Group Key: property_1."Id", "TransactionGroups"."RevenueBucketText", datum."Date", roomtype."Code
2. 0.055 63.852 ↓ 6.2 25 1

Sort (cost=873.43..873.44 rows=4 width=125) (actual time=63.851..63.852 rows=25 loops=1)

  • Sort Key: property_1."Id", "TransactionGroups"."RevenueBucketText", roomtype."Code
  • Sort Method: quicksort Memory: 27kB
3. 0.007 63.797 ↓ 6.2 25 1

Append (cost=205.04..873.39 rows=4 width=125) (actual time=2.916..63.797 rows=25 loops=1)

4. 0.032 52.068 ↓ 20.0 20 1

Nested Loop Left Join (cost=205.04..252.46 rows=1 width=108) (actual time=2.916..52.068 rows=20 loops=1)

5. 0.064 0.416 ↓ 20.0 20 1

Nested Loop (cost=51.02..98.41 rows=1 width=64) (actual time=0.153..0.416 rows=20 loops=1)

  • Join Filter: ((datum."Date" <= property."BusinessDate") AND (datum."Date" >= property."GoLiveDate"))
6. 0.044 0.312 ↓ 20.0 20 1

Nested Loop (cost=50.73..90.08 rows=1 width=64) (actual time=0.145..0.312 rows=20 loops=1)

  • Join Filter: (datum_1."Date" >= property_2."GoLiveDate")
7. 0.009 0.228 ↓ 20.0 20 1

Nested Loop (cost=50.44..85.75 rows=1 width=72) (actual time=0.141..0.228 rows=20 loops=1)

8. 0.013 0.095 ↓ 4.0 4 1

Nested Loop (cost=5.20..40.49 rows=1 width=76) (actual time=0.039..0.095 rows=4 loops=1)

9. 0.012 0.070 ↓ 4.0 4 1

Nested Loop (cost=4.91..32.16 rows=1 width=52) (actual time=0.034..0.070 rows=4 loops=1)

  • Join Filter: (datum."Date" >= property_1."GoLiveDate")
10. 0.006 0.046 ↓ 4.0 4 1

Nested Loop (cost=4.62..27.84 rows=1 width=52) (actual time=0.026..0.046 rows=4 loops=1)

11. 0.013 0.013 ↑ 1.0 1 1

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_1 (cost=0.29..8.31 rows=1 width=24) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
12. 0.021 0.027 ↓ 4.0 4 1

Bitmap Heap Scan on "RoomTypes" roomtype (cost=4.32..19.51 rows=1 width=44) (actual time=0.011..0.027 rows=4 loops=1)

  • Recheck Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
  • Filter: ("IsActive" AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=5
13. 0.006 0.006 ↓ 2.0 8 1

Bitmap Index Scan on "IX_RoomTypes_PropertyId" (cost=0.00..4.32 rows=4 width=0) (actual time=0.006..0.006 rows=8 loops=1)

  • Index Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
14. 0.012 0.012 ↑ 1.0 1 4

Index Only Scan using "PK_DatesList" on "DatesList" datum (cost=0.29..4.31 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=4)

  • Index Cond: (("Date" >= (CURRENT_TIMESTAMP - '1 year 6 mons'::interval)) AND ("Date" <= (CURRENT_TIMESTAMP + '1 year 6 mons'::interval)) AND ("Date" = '2019-12-04 00:00:00'::timestamp without time zo
  • Heap Fetches: 0
15. 0.012 0.012 ↑ 1.0 1 4

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_2 (cost=0.29..8.31 rows=1 width=24) (actual time=0.002..0.003 rows=1 loops=4)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
16. 0.016 0.124 ↓ 5.0 5 4

Unique (cost=45.24..45.25 rows=1 width=28) (actual time=0.025..0.031 rows=5 loops=4)

17. 0.018 0.108 ↓ 12.0 12 4

Sort (cost=45.24..45.24 rows=1 width=28) (actual time=0.025..0.027 rows=12 loops=4)

  • Sort Key: "TransactionGroups"."RevenueBucketText", "TransactionGroups"."RevenueBucket
  • Sort Method: quicksort Memory: 25kB
18. 0.076 0.090 ↓ 12.0 12 1

Bitmap Heap Scan on "TransactionGroups" (cost=4.38..45.23 rows=1 width=28) (actual time=0.029..0.090 rows=12 loops=1)

  • Recheck Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
  • Filter: ("IsActive" AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=77
19. 0.014 0.014 ↓ 13.8 152 1

Bitmap Index Scan on "IX_TransactionGroups_PropertyId" (cost=0.00..4.38 rows=11 width=0) (actual time=0.014..0.014 rows=152 loops=1)

  • Index Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
20. 0.040 0.040 ↑ 1.0 1 20

Index Only Scan using "PK_DatesList" on "DatesList" datum_1 (cost=0.29..4.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=20)

  • Index Cond: (("Date" >= (CURRENT_TIMESTAMP - '1 year 6 mons'::interval)) AND ("Date" <= (CURRENT_TIMESTAMP + '1 year 6 mons'::interval)) AND ("Date" = '2019-12-04 00:00:00'::timestamp without time zone))
  • Heap Fetches: 0
21. 0.040 0.040 ↑ 1.0 1 20

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property (cost=0.29..8.31 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=20)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
22. 0.040 51.620 ↑ 1.0 1 20

Aggregate (cost=154.02..154.03 rows=1 width=64) (actual time=2.581..2.581 rows=1 loops=20)

23. 0.020 51.580 ↑ 1.0 1 20

Result (cost=1.84..154.01 rows=1 width=9) (actual time=1.873..2.579 rows=1 loops=20)

  • One-Time Filter: ((current_setting('my.PropertyId'::text))::uuid = property_1."Id")
24. 0.070 51.560 ↑ 1.0 1 20

Nested Loop (cost=1.84..154.01 rows=1 width=9) (actual time=1.871..2.578 rows=1 loops=20)

25. 0.000 51.300 ↓ 5.0 5 20

Nested Loop (cost=1.42..145.54 rows=1 width=25) (actual time=1.145..2.565 rows=5 loops=20)

26. 0.000 41.340 ↓ 50.0 50 20

Nested Loop (cost=0.86..132.91 rows=1 width=16) (actual time=0.527..2.067 rows=50 loops=20)

27. 37.400 37.400 ↓ 50.0 50 20

Index Scan using "IX_Reservations_TenantId" on "Reservations" res (cost=0.43..124.44 rows=1 width=16) (actual time=0.522..1.870 rows=50 loops=20)

  • Index Cond: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)
  • Filter: (("ReservationStatus" <> 'CX'::text) AND ("PropertyId" = property_1."Id") AND ("RoomTypeId" = roomtype."Id"))
  • Rows Removed by Filter: 2352
28. 4.040 4.040 ↑ 1.0 1 1,010

Index Scan using "IX_Accounts_OriginatorId_OriginatorRole" on "Accounts" acc (cost=0.42..8.46 rows=1 width=32) (actual time=0.003..0.004 rows=1 loops=1,010)

  • Index Cond: (("OriginatorId" = res."Id") AND ("OriginatorRole" = 'Reservation'::text))
  • Filter: (("PropertyId" = property_1."Id") AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
29. 10.100 10.100 ↓ 0.0 0 1,010

Index Scan using "IX_Transactions_AccountId_PropertyId" on "Transactions" transactions (cost=0.56..12.63 rows=1 width=41) (actual time=0.009..0.010 rows=0 loops=1,010)

  • Index Cond: (("AccountId" = acc."Id") AND ("PropertyId" = property_1."Id"))
  • Filter: (("TransactionType" = 'Revenue'::text) AND ("BusinessDate" = datum."Date") AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 11
30. 0.190 0.190 ↓ 0.0 0 95

Index Scan using "PK_TransactionCodes" on "TransactionCodes" trxcode (cost=0.41..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=95)

  • Index Cond: (("Id" = transactions."TransactionCodeId") AND ("PropertyId" = property_1."Id"))
  • Filter: (("RevenueBucket" = "TransactionGroups"."RevenueBucket") AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 1
31. 0.009 11.620 ↓ 5.0 5 1

Nested Loop Left Join (cost=261.62..269.71 rows=1 width=128) (actual time=3.806..11.620 rows=5 loops=1)

32. 0.062 0.306 ↓ 5.0 5 1

Nested Loop (cost=90.38..98.44 rows=1 width=36) (actual time=0.224..0.306 rows=5 loops=1)

  • Join Filter: ((datum_2."Date" <= property_3."BusinessDate") AND (datum_2."Date" >= property_3."GoLiveDate"))
33. 0.007 0.229 ↓ 5.0 5 1

Unique (cost=90.09..90.10 rows=1 width=36) (actual time=0.218..0.229 rows=5 loops=1)

34. 0.017 0.222 ↓ 20.0 20 1

Sort (cost=90.09..90.09 rows=1 width=36) (actual time=0.217..0.222 rows=20 loops=1)

  • Sort Key: "TransactionGroups_1"."RevenueBucket", "TransactionGroups_1"."RevenueBucketText
  • Sort Method: quicksort Memory: 26kB
35. 0.010 0.205 ↓ 20.0 20 1

Nested Loop (cost=50.73..90.08 rows=1 width=36) (actual time=0.146..0.205 rows=20 loops=1)

  • Join Filter: (datum_3."Date" >= property_5."GoLiveDate")
36. 0.006 0.175 ↓ 20.0 20 1

Nested Loop (cost=50.44..85.75 rows=1 width=44) (actual time=0.142..0.175 rows=20 loops=1)

37. 0.010 0.057 ↓ 4.0 4 1

Nested Loop (cost=5.20..40.49 rows=1 width=48) (actual time=0.036..0.057 rows=4 loops=1)

38. 0.004 0.043 ↓ 4.0 4 1

Nested Loop (cost=4.91..32.16 rows=1 width=24) (actual time=0.030..0.043 rows=4 loops=1)

  • Join Filter: (datum_2."Date" >= property_4."GoLiveDate")
39. 0.007 0.031 ↓ 4.0 4 1

Nested Loop (cost=4.62..27.84 rows=1 width=24) (actual time=0.024..0.031 rows=4 loops=1)

40. 0.007 0.007 ↑ 1.0 1 1

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_4 (cost=0.29..8.31 rows=1 width=24) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
41. 0.011 0.017 ↓ 4.0 4 1

Bitmap Heap Scan on "RoomTypes" roomtype_1 (cost=4.32..19.51 rows=1 width=16) (actual time=0.010..0.017 rows=4 loops=1)

  • Recheck Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
  • Filter: ("IsActive" AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=5
42. 0.006 0.006 ↓ 2.0 8 1

Bitmap Index Scan on "IX_RoomTypes_PropertyId" (cost=0.00..4.32 rows=4 width=0) (actual time=0.006..0.006 rows=8 loops=1)

  • Index Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
43. 0.008 0.008 ↑ 1.0 1 4

Index Only Scan using "PK_DatesList" on "DatesList" datum_2 (cost=0.29..4.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=4)

  • Index Cond: (("Date" >= (CURRENT_TIMESTAMP - '1 year 6 mons'::interval)) AND ("Date" <= (CURRENT_TIMESTAMP + '1 year 6 mons'::interval)) AND ("Date" = '2019-12-04 00:00:00'::timestamp wit
  • Heap Fetches: 0
44. 0.004 0.004 ↑ 1.0 1 4

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_5 (cost=0.29..8.31 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=4)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
45. 0.008 0.112 ↓ 5.0 5 4

Unique (cost=45.24..45.25 rows=1 width=28) (actual time=0.026..0.028 rows=5 loops=4)

46. 0.010 0.104 ↓ 12.0 12 4

Sort (cost=45.24..45.24 rows=1 width=28) (actual time=0.026..0.026 rows=12 loops=4)

  • Sort Key: "TransactionGroups_1"."RevenueBucketText", "TransactionGroups_1"."RevenueBucket
  • Sort Method: quicksort Memory: 25kB
47. 0.078 0.094 ↓ 12.0 12 1

Bitmap Heap Scan on "TransactionGroups" "TransactionGroups_1" (cost=4.38..45.23 rows=1 width=28) (actual time=0.032..0.094 rows=12 loops=1)

  • Recheck Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
  • Filter: ("IsActive" AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=77
48. 0.016 0.016 ↓ 13.8 152 1

Bitmap Index Scan on "IX_TransactionGroups_PropertyId" (cost=0.00..4.38 rows=11 width=0) (actual time=0.016..0.016 rows=152 loops=1)

  • Index Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
49. 0.020 0.020 ↑ 1.0 1 20

Index Only Scan using "PK_DatesList" on "DatesList" datum_3 (cost=0.29..4.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=20)

  • Index Cond: (("Date" >= (CURRENT_TIMESTAMP - '1 year 6 mons'::interval)) AND ("Date" <= (CURRENT_TIMESTAMP + '1 year 6 mons'::interval)) AND ("Date" = '2019-12-04 00:00:00'::timestamp without time zone))
  • Heap Fetches: 0
50. 0.015 0.015 ↑ 1.0 1 5

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_3 (cost=0.29..8.31 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=5)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
51. 0.005 11.305 ↑ 1.0 1 5

Aggregate (cost=171.24..171.25 rows=1 width=64) (actual time=2.261..2.261 rows=1 loops=5)

52. 0.010 11.300 ↓ 0.0 0 5

Result (cost=1.42..171.23 rows=1 width=9) (actual time=2.260..2.260 rows=0 loops=5)

  • One-Time Filter: ((current_setting('my.PropertyId'::text))::uuid = property_4."Id")
53. 0.005 11.290 ↓ 0.0 0 5

Nested Loop (cost=1.42..171.23 rows=1 width=9) (actual time=2.258..2.258 rows=0 loops=5)

54. 0.290 11.285 ↓ 0.0 0 5

Nested Loop (cost=0.99..162.76 rows=1 width=25) (actual time=2.257..2.257 rows=0 loops=5)

55. 8.170 8.170 ↓ 113.0 113 5

Index Scan using "IX_Accounts_TenantId" on "Accounts" acc_1 (cost=0.43..150.12 rows=1 width=32) (actual time=0.040..1.634 rows=113 loops=5)

  • Index Cond: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)
  • Filter: (("OriginatorRole" <> 'Reservation'::text) AND ("PropertyId" = property_4."Id"))
  • Rows Removed by Filter: 2772
56. 2.825 2.825 ↓ 0.0 0 565

Index Scan using "IX_Transactions_AccountId_PropertyId" on "Transactions" transactions_1 (cost=0.56..12.63 rows=1 width=57) (actual time=0.005..0.005 rows=0 loops=565)

  • Index Cond: (("AccountId" = acc_1."Id") AND ("PropertyId" = property_4."Id"))
  • Filter: (("TransactionType" = 'Revenue'::text) AND ("BusinessDate" = datum_2."Date") AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 4
57. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_TransactionCodes" on "TransactionCodes" trxcode_1 (cost=0.41..8.45 rows=1 width=16) (never executed)

  • Index Cond: (("Id" = transactions_1."TransactionCodeId") AND ("PropertyId" = property_4."Id"))
  • Filter: (("RevenueBucket" = "TransactionGroups_1"."RevenueBucket") AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
58. 0.001 0.062 ↓ 0.0 0 1

Nested Loop Left Join (cost=208.10..251.86 rows=1 width=132) (actual time=0.062..0.062 rows=0 loops=1)

59. 0.010 0.061 ↓ 0.0 0 1

Nested Loop (cost=5.20..40.49 rows=1 width=36) (actual time=0.061..0.061 rows=0 loops=1)

  • Join Filter: ((datum_4."Date" >= property_6."BusinessDate") AND (datum_4."Date" >= property_6."GoLiveDate"))
  • Rows Removed by Join Filter: 4
60. 0.005 0.047 ↓ 4.0 4 1

Nested Loop (cost=4.91..32.16 rows=1 width=36) (actual time=0.033..0.047 rows=4 loops=1)

  • Join Filter: (datum_4."Date" >= property_7."GoLiveDate")
61. 0.008 0.034 ↓ 4.0 4 1

Nested Loop (cost=4.62..27.84 rows=1 width=36) (actual time=0.025..0.034 rows=4 loops=1)

62. 0.007 0.007 ↑ 1.0 1 1

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_7 (cost=0.29..8.31 rows=1 width=24) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
63. 0.013 0.019 ↓ 4.0 4 1

Bitmap Heap Scan on "RoomTypes" roomtype_2 (cost=4.32..19.51 rows=1 width=28) (actual time=0.010..0.019 rows=4 loops=1)

  • Recheck Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
  • Filter: ("IsActive" AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=5
64. 0.006 0.006 ↓ 2.0 8 1

Bitmap Index Scan on "IX_RoomTypes_PropertyId" (cost=0.00..4.32 rows=4 width=0) (actual time=0.006..0.006 rows=8 loops=1)

  • Index Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
65. 0.008 0.008 ↑ 1.0 1 4

Index Only Scan using "PK_DatesList" on "DatesList" datum_4 (cost=0.29..4.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=4)

  • Index Cond: (("Date" >= (CURRENT_TIMESTAMP - '1 year 6 mons'::interval)) AND ("Date" <= (CURRENT_TIMESTAMP + '1 year 6 mons'::interval)) AND ("Date" = '2019-12-04 00:00:00'::timestamp without time zone))
  • Heap Fetches: 0
66. 0.004 0.004 ↑ 1.0 1 4

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_6 (cost=0.29..8.31 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=4)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
67. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=202.89..202.90 rows=1 width=64) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Result (cost=186.76..202.88 rows=1 width=10) (never executed)

  • One-Time Filter: ((current_setting('my.PropertyId'::text))::uuid = property_7."Id")
69. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=186.76..202.88 rows=1 width=10) (never executed)

70. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on "ReservationDetails" resdet (cost=186.33..190.36 rows=1 width=40) (never executed)

  • Recheck Cond: (("TenantId" = (current_setting('my.TenantId'::text))::uuid) AND ("BusinessDate" = datum_4."Date"))
  • Filter: (("ReservationStatus" <> 'CX'::text) AND ("PropertyId" = property_7."Id") AND ("RoomTypeCode" = roomtype_2."Code"))
71. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=186.33..186.33 rows=1 width=0) (never executed)

72. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on "IX_ReservationDetails_TenantId" (cost=0.00..22.39 rows=261 width=0) (never executed)

  • Index Cond: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)
73. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on "IX_ReservationDetails_BusinessDate" (cost=0.00..163.69 rows=3,101 width=0) (never executed)

  • Index Cond: ("BusinessDate" = datum_4."Date")
74. 0.000 0.000 ↓ 0.0 0

Result (cost=0.42..12.50 rows=1 width=50) (never executed)

  • One-Time Filter: (((current_setting('my.PropertyId'::text))::uuid = property_7."Id") AND ((current_setting('my.PropertyId'::text))::uuid = property_7."Id"))
75. 0.000 0.000 ↓ 0.0 0

Index Scan using "IX_ReservationCharges_ReservationId" on "ReservationCharges" rescharge (cost=0.42..12.50 rows=1 width=50) (never executed)

  • Index Cond: ("ReservationId" = resdet."Id")
  • Filter: (("PropertyId" = property_7."Id") AND ("BusinessDay" = datum_4."Date") AND ("Type" = 1) AND ("PropertyId" = resdet."PropertyId") AND ("BusinessDay" = resdet."BusinessDate") AND ("TenantId" = (curre
76.          

SubPlan (for Nested Loop Left Join)

77. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.41..8.44 rows=1 width=8) (never executed)

78. 0.000 0.000 ↓ 0.0 0

Result (cost=0.41..8.44 rows=1 width=8) (never executed)

  • One-Time Filter: ((current_setting('my.PropertyId'::text))::uuid = property_7."Id")
79. 0.000 0.000 ↓ 0.0 0

Index Scan using "IX_TransactionGroups_RevenueBucket_PropertyId" on "TransactionGroups" revbuckets (cost=0.41..8.44 rows=1 width=8) (never executed)

  • Index Cond: (("RevenueBucket" = 1) AND ("PropertyId" = property_7."Id"))
  • Filter: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)
80. 0.000 0.040 ↓ 0.0 0 1

Nested Loop Left Join (cost=55.55..99.32 rows=1 width=132) (actual time=0.040..0.040 rows=0 loops=1)

81. 0.008 0.040 ↓ 0.0 0 1

Nested Loop (cost=5.20..40.49 rows=1 width=52) (actual time=0.040..0.040 rows=0 loops=1)

  • Join Filter: ((datum_5."Date" >= property_8."BusinessDate") AND (datum_5."Date" >= property_8."GoLiveDate"))
  • Rows Removed by Join Filter: 4
82. 0.006 0.028 ↓ 4.0 4 1

Nested Loop (cost=4.91..32.16 rows=1 width=52) (actual time=0.018..0.028 rows=4 loops=1)

  • Join Filter: (datum_5."Date" >= property_9."GoLiveDate")
83. 0.003 0.018 ↓ 4.0 4 1

Nested Loop (cost=4.62..27.84 rows=1 width=52) (actual time=0.013..0.018 rows=4 loops=1)

84. 0.005 0.005 ↑ 1.0 1 1

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_9 (cost=0.29..8.31 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
85. 0.007 0.010 ↓ 4.0 4 1

Bitmap Heap Scan on "RoomTypes" roomtype_3 (cost=4.32..19.51 rows=1 width=44) (actual time=0.006..0.010 rows=4 loops=1)

  • Recheck Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
  • Filter: ("IsActive" AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=5
86. 0.003 0.003 ↓ 2.0 8 1

Bitmap Index Scan on "IX_RoomTypes_PropertyId" (cost=0.00..4.32 rows=4 width=0) (actual time=0.003..0.003 rows=8 loops=1)

  • Index Cond: ("PropertyId" = (current_setting('my.PropertyId'::text))::uuid)
87. 0.004 0.004 ↑ 1.0 1 4

Index Only Scan using "PK_DatesList" on "DatesList" datum_5 (cost=0.29..4.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=4)

  • Index Cond: (("Date" >= (CURRENT_TIMESTAMP - '1 year 6 mons'::interval)) AND ("Date" <= (CURRENT_TIMESTAMP + '1 year 6 mons'::interval)) AND ("Date" = '2019-12-04 00:00:00'::timestamp without time zone))
  • Heap Fetches: 0
88. 0.004 0.004 ↑ 1.0 1 4

Index Scan using "PK_PropertyDetails" on "PropertyDetails" property_8 (cost=0.29..8.31 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=4)

  • Index Cond: (("Id" = (current_setting('my.PropertyId'::text))::uuid) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
89. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=50.35..50.36 rows=1 width=64) (never executed)

90. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=50.32..50.33 rows=1 width=64) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Result (cost=14.75..50.30 rows=1 width=14) (never executed)

  • One-Time Filter: ((current_setting('my.PropertyId'::text))::uuid = property_9."Id")
92. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=14.75..50.30 rows=1 width=14) (never executed)

93. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=14.32..41.83 rows=1 width=46) (never executed)

94. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on "GroupCharges" groupcharge (cost=14.05..28.17 rows=1 width=46) (never executed)

  • Recheck Cond: (("PropertyId" = property_9."Id") AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
  • Filter: (("BusinessDay" = datum_5."Date") AND ("RoomTypeId" = roomtype_3."Id") AND ("GroupChargeType" = 1))
95. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=14.05..14.05 rows=5 width=0) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on "IX_GroupCharges_PropertyId" (cost=0.00..4.58 rows=41 width=0) (never executed)

  • Index Cond: ("PropertyId" = property_9."Id")
97. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on "IX_GroupCharges_TenantId" (cost=0.00..9.21 rows=124 width=0) (never executed)

  • Index Cond: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)
98. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_GroupHeaders" on "GroupHeaders" groupheader (cost=0.28..8.31 rows=1 width=48) (never executed)

  • Index Cond: (("Id" = groupcharge."GroupId") AND ("PropertyId" = property_9."Id"))
  • Filter: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)
99. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_GroupStatus" on "GroupStatus" groupstatus (cost=0.41..8.45 rows=1 width=32) (never executed)

  • Index Cond: (("Id" = groupheader."GroupStatusId") AND ("PropertyId" = property_9."Id"))
  • Filter: (("GroupStatusRole" <> 'CXL'::text) AND ("InventoryStatus" = 'D'::text) AND ("TenantId" = (current_setting('my.TenantId'::text))::uuid))
100.          

SubPlan (for Nested Loop Left Join)

101. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.41..8.44 rows=1 width=8) (never executed)

102. 0.000 0.000 ↓ 0.0 0

Result (cost=0.41..8.44 rows=1 width=8) (never executed)

  • One-Time Filter: ((current_setting('my.PropertyId'::text))::uuid = property_9."Id")
103. 0.000 0.000 ↓ 0.0 0

Index Scan using "IX_TransactionGroups_RevenueBucket_PropertyId" on "TransactionGroups" revbuckets_1 (cost=0.41..8.44 rows=1 width=8) (never executed)

  • Index Cond: (("RevenueBucket" = 1) AND ("PropertyId" = property_9."Id"))
  • Filter: ("TenantId" = (current_setting('my.TenantId'::text))::uuid)