explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ktXT

Settings
# exclusive inclusive rows x rows loops node
1. 61,478.236 102,362.797 ↓ 348.0 833,527 1

Result (cost=287,462.80..306,832.36 rows=2,395 width=1,287) (actual time=39,431.870..102,362.797 rows=833,527 loops=1)

  • Functions: 254
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 25.421 ms, Inlining 0.000 ms, Optimization 14.709 ms, Emission 233.064 ms, Total 273.194 ms"Execution Time: 102603.708 ms
2. 8,069.720 40,884.561 ↓ 348.0 833,527 1

Sort (cost=287,462.80..287,468.78 rows=2,395 width=6,210) (actual time=39,431.490..40,884.561 rows=833,527 loops=1)

  • Sort Key: p.property_name, (CASE WHEN (mr.property_building_id IS NOT NULL) THEN mr.property_building_id ELSE NULL::integer END), (CASE WHEN ((COALESCE(mrd.unit_number, ''::character varying))::text <> ''::text) THEN mrd.unit_number ELSE NULL::character varying END), pu.unit_number, us.unit_number_cache
  • Sort Method: external merge Disk: 291576kB
3. 1,162.391 32,814.841 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=3,263.06..280,940.87 rows=2,395 width=6,210) (actual time=266.557..32,814.841 rows=833,527 loops=1)

4. 322.859 29,985.396 ↓ 348.0 833,527 1

Hash Left Join (cost=3,246.55..241,213.80 rows=2,395 width=6,165) (actual time=266.501..29,985.396 rows=833,527 loops=1)

  • Hash Cond: ((lp.cid = pp.cid) AND (lp.property_id = pp.property_id))
5. 308.409 29,662.157 ↓ 348.0 833,527 1

Hash Join (cost=2,578.08..240,532.76 rows=2,395 width=6,165) (actual time=266.114..29,662.157 rows=833,527 loops=1)

  • Hash Cond: (mst.maintenance_status_type_id = msts.id)
6. 329.464 29,101.101 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,576.99..240,518.72 rows=2,395 width=6,165) (actual time=13.447..29,101.101 rows=833,527 loops=1)

7. 72.959 27,104.583 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,576.57..239,448.75 rows=2,395 width=6,168) (actual time=13.430..27,104.583 rows=833,527 loops=1)

8. 471.042 24,531.043 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,555.34..188,528.84 rows=2,395 width=6,160) (actual time=13.406..24,531.043 rows=833,527 loops=1)

9. 505.275 24,060.001 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,555.05..187,784.95 rows=2,395 width=6,150) (actual time=13.398..24,060.001 rows=833,527 loops=1)

10. 433.411 21,887.672 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,546.73..167,786.70 rows=2,395 width=5,998) (actual time=13.377..21,887.672 rows=833,527 loops=1)

11. 457.785 20,620.734 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,546.46..167,037.70 rows=2,395 width=5,846) (actual time=13.359..20,620.734 rows=833,527 loops=1)

12. 262.784 20,162.949 ↓ 348.0 833,527 1

Hash Left Join (cost=2,546.17..166,240.05 rows=2,395 width=5,705) (actual time=13.341..20,162.949 rows=833,527 loops=1)

  • Hash Cond: (us.unit_space_status_type_id = usst.id)
13. 482.523 19,900.148 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,544.02..166,227.80 rows=2,395 width=5,591) (actual time=13.315..19,900.148 rows=833,527 loops=1)

14. 435.098 19,417.625 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,543.60..165,158.40 rows=2,395 width=5,577) (actual time=13.292..19,417.625 rows=833,527 loops=1)

15. 1,041.584 18,149.000 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,543.32..164,388.10 rows=2,395 width=5,420) (actual time=13.269..18,149.000 rows=833,527 loops=1)

16. 741.393 16,273.889 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,543.02..163,626.75 rows=2,395 width=5,217) (actual time=13.243..16,273.889 rows=833,527 loops=1)

17. 263.187 14,698.969 ↓ 348.0 833,527 1

Hash Left Join (cost=2,542.74..162,895.35 rows=2,395 width=5,196) (actual time=13.230..14,698.969 rows=833,527 loops=1)

  • Hash Cond: ((mr.cid = work_order_labors_cost.cid) AND (mr.id = work_order_labors_cost.maintenance_request_id))
18. 264.670 14,435.768 ↓ 348.0 833,527 1

Hash Left Join (cost=2,541.05..162,875.69 rows=2,395 width=5,164) (actual time=13.209..14,435.768 rows=833,527 loops=1)

  • Hash Cond: ((mr.cid = work_order_materials_cost.cid) AND (mr.id = work_order_materials_cost.maintenance_request_id))
19. 702.240 14,171.072 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,538.49..162,855.15 rows=2,395 width=5,132) (actual time=13.175..14,171.072 rows=833,527 loops=1)

20. 758.428 12,635.305 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,538.21..162,142.54 rows=2,395 width=4,508) (actual time=13.152..12,635.305 rows=833,527 loops=1)

21. 789.260 11,043.350 ↓ 348.0 833,527 1

Nested Loop Left Join (cost=2,537.93..161,423.55 rows=2,395 width=3,601) (actual time=13.122..11,043.350 rows=833,527 loops=1)

  • Join Filter: (mp2.cid = mr.cid)
22. 269.702 10,254.090 ↓ 348.0 833,527 1

Hash Left Join (cost=2,537.65..159,431.17 rows=2,395 width=2,948) (actual time=13.116..10,254.090 rows=833,527 loops=1)

  • Hash Cond: ((mr.cid = ce.cid) AND (mr.company_employee_id = ce.id))
23. 331.179 9,974.124 ↓ 348.0 833,527 1

Hash Join (cost=1,080.07..157,947.48 rows=2,395 width=2,918) (actual time=2.839..9,974.124 rows=833,527 loops=1)

  • Hash Cond: (mr.maintenance_status_id = mst.id)
24. 459.814 9,642.571 ↓ 43.0 833,527 1

Nested Loop Left Join (cost=1,007.08..157,823.23 rows=19,403 width=2,247) (actual time=2.452..9,642.571 rows=833,527 loops=1)

25. 661.866 9,182.757 ↓ 43.0 833,527 1

Nested Loop Left Join (cost=1,006.79..151,785.67 rows=19,403 width=1,594) (actual time=2.448..9,182.757 rows=833,527 loops=1)

26. 239.112 7,687.364 ↓ 43.0 833,527 1

Hash Left Join (cost=1,006.51..145,748.13 rows=19,403 width=937) (actual time=2.441..7,687.364 rows=833,527 loops=1)

  • Hash Cond: ((mr.cid = cpn.cid) AND (mr.customer_id = cpn.customer_id))
  • Join Filter: (c.primary_phone_number_type_id IS NULL)
  • Rows Removed by Join Filter: 139
27. 469.922 7,446.008 ↓ 43.0 833,527 1

Nested Loop Left Join (cost=632.58..145,033.36 rows=19,403 width=926) (actual time=0.185..7,446.008 rows=833,527 loops=1)

28. 505.753 6,976.086 ↓ 43.0 833,527 1

Nested Loop (cost=632.16..136,299.41 rows=19,403 width=853) (actual time=0.157..6,976.086 rows=833,527 loops=1)

29. 733.718 3,521.667 ↓ 47.9 1,474,333 1

Hash Join (cost=631.72..119,432.45 rows=30,808 width=229) (actual time=0.129..3,521.667 rows=1,474,333 loops=1)

  • Hash Cond: (mr.maintenance_request_type_id = mrt.id)
  • Join Filter: CASE WHEN (mr.parent_maintenance_request_id IS NOT NULL) THEN (mrt.id = ANY ('{2,1,0,5}'::integer[])) ELSE (mrt.id = ANY ('{3,2,1,5}'::integer[])) END
  • Rows Removed by Join Filter: 1467517
30. 499.106 2,787.935 ↓ 47.7 2,941,850 1

Nested Loop (cost=630.61..119,139.43 rows=61,615 width=115) (actual time=0.107..2,787.935 rows=2,941,850 loops=1)

31. 0.013 0.013 ↑ 1.0 2 1

Index Scan using idx_lp_property_id on lp (cost=0.13..12.16 rows=2 width=23) (actual time=0.010..0.013 rows=2 loops=1)

32. 2,161.082 2,288.816 ↓ 47.7 1,470,925 2

Bitmap Heap Scan on maintenance_requests mr (cost=630.48..59,255.56 rows=30,808 width=92) (actual time=67.853..1,144.408 rows=1,470,925 loops=2)

  • Recheck Cond: (property_id = lp.property_id)
  • Filter: (((deleted_on IS NULL) OR (deleted_on > '2019-12-31 00:00:00+00'::timestamp with time zone)) AND (cid = 235) AND ((created_by = 18) OR (ps_product_id = ANY ('{7,36,1,21981,20612,56,14,8292,46,31693,3,34}'::integer[]))) AND (maintenance_status_id = ANY ('{114205,114206,114061,114244,114148,113464,114226,114353,25046,2354,114586,114587,113061,19746,113906,114361,114234,112502,22825,2355,13831,113053,114502,113866,15097,114370,15098,18920,14376,15071,2351,113757,113907,68841,114314,113916,114233,113054,2352,113758,113759,113761,114362,113939,114503,113977,113444,2353,112662,113467,113892,113893,113891,113371,113335,14497,113122,113057,113060,69204,113867,113868,114591,114603,114664,114713,114740,114753,114791,114854,114927,114948,115042,115100,115367,115841,115842,115843,115368}'::integer[])) AND (maintenance_priority_id = ANY ('{24875,25741,26074,24879,25358,27538,27540,2020,25457,26089,1398,24989,24210,27486,26663,24861,24961,25798,26327,26080,2394,26121,26101,24899,24795,28771,25652,24793,24877,24876,25721,2376,25456,26361,25186,24867,27539,2352,26600,25509,26291,24796,26602,25641,25629,25740,25423,25508,26599,26290,25650,26179,24862,26459,945,25042,19686,26603,26601,2353,26359,24440,26391,18756,18757,17787,24898,27014,24839,25507,28285,25818,26114,26636,27163,24881,24878,2354,25357,26637,24611,26820,25649,25690,24507,27598,25455,2355,25651,26161,26390,26162,24880,2356,26650,2351,661,24906,24863,24868,25648}'::integer[])))
  • Rows Removed by Filter: 590
  • Heap Blocks: exact=48463
33. 127.734 127.734 ↓ 43.7 1,471,515 2

Bitmap Index Scan on idx_maintenance_requests_property_id (cost=0.00..622.78 rows=33,647 width=0) (actual time=63.867..63.867 rows=1,471,515 loops=2)

  • Index Cond: (property_id = lp.property_id)
34. 0.003 0.014 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=122) (actual time=0.014..0.014 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 0.011 0.011 ↑ 1.0 5 1

Seq Scan on maintenance_request_types mrt (cost=0.00..1.05 rows=5 width=122) (actual time=0.010..0.011 rows=5 loops=1)

36. 2,948.666 2,948.666 ↑ 1.0 1 1,474,333

Index Scan using idx_maintenance_request_details_maintenance_request_id on maintenance_request_details mrd (cost=0.43..0.54 rows=1 width=632) (actual time=0.002..0.002 rows=1 loops=1,474,333)

  • Index Cond: (maintenance_request_id = mr.id)
  • Filter: ((actual_start_datetime >= '2019-01-01 00:00:00+00'::timestamp with time zone) AND (actual_start_datetime < '2020-01-01 00:00:00'::timestamp without time zone) AND (cid = 235))
  • Rows Removed by Filter: 0
37. 0.000 0.000 ↓ 0.0 0 833,527

Index Scan using pk_customers on customers c (cost=0.42..0.45 rows=1 width=81) (actual time=0.000..0.000 rows=0 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.customer_id))
38. 0.703 2.244 ↑ 1.1 4,589 1

Hash (cost=297.43..297.43 rows=5,100 width=19) (actual time=2.244..2.244 rows=4,589 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 266kB
39. 1.541 1.541 ↑ 1.1 4,589 1

Seq Scan on customer_phone_numbers cpn (cost=0.00..297.43 rows=5,100 width=19) (actual time=0.066..1.541 rows=4,589 loops=1)

  • Filter: ((phone_number_type_id <> 1) AND (cid = 235))
  • Rows Removed by Filter: 6773
40. 833.527 833.527 ↑ 1.0 1 833,527

Index Scan using pk_maintenance_problems on maintenance_problems mp (cost=0.29..0.31 rows=1 width=673) (actual time=0.001..0.001 rows=1 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.maintenance_problem_id))
41. 0.000 0.000 ↓ 0.0 0 833,527

Index Scan using pk_maintenance_problems on maintenance_problems mp1 (cost=0.29..0.31 rows=1 width=665) (actual time=0.000..0.000 rows=0 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.sub_maintenance_problem_id))
42. 0.021 0.374 ↑ 1.0 79 1

Hash (cost=72.00..72.00 rows=79 width=683) (actual time=0.374..0.374 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
43. 0.353 0.353 ↑ 1.0 79 1

Seq Scan on maintenance_statuses mst (cost=0.00..72.00 rows=79 width=683) (actual time=0.023..0.353 rows=79 loops=1)

  • Filter: (cid = 235)
  • Rows Removed by Filter: 561
44. 0.712 10.264 ↑ 1.0 2,910 1

Hash (cost=1,413.66..1,413.66 rows=2,928 width=42) (actual time=10.264..10.264 rows=2,910 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 236kB
45. 1.042 9.552 ↑ 1.0 2,910 1

Merge Left Join (cost=13.36..1,413.66 rows=2,928 width=42) (actual time=0.618..9.552 rows=2,910 loops=1)

  • Merge Cond: (ce.id = cu.company_employee_id)
  • Join Filter: (cu.cid = ce.cid)
46. 2.465 2.465 ↑ 1.0 2,908 1

Index Scan using idx_company_employees_id on company_employees ce (cost=0.29..798.18 rows=2,928 width=21) (actual time=0.009..2.465 rows=2,908 loops=1)

  • Filter: (cid = 235)
  • Rows Removed by Filter: 5689
47. 6.045 6.045 ↑ 4.3 2,090 1

Index Scan using idx_company_users_cid_company_employee_id on company_users cu (cost=0.42..37,560.35 rows=8,914 width=29) (actual time=0.052..6.045 rows=2,090 loops=1)

  • Filter: ((cid = 235) AND (company_user_type_id = 2))
  • Rows Removed by Filter: 6771
48. 0.000 0.000 ↓ 0.0 0 833,527

Index Scan using pk_maintenance_problems on maintenance_problems mp2 (cost=0.29..0.82 rows=1 width=665) (actual time=0.000..0.000 rows=0 loops=833,527)

  • Index Cond: ((cid = 235) AND (id = mp.maintenance_problem_id))
49. 833.527 833.527 ↑ 1.0 1 833,527

Index Scan using pk_maintenance_locations on maintenance_locations ml (cost=0.28..0.30 rows=1 width=915) (actual time=0.001..0.001 rows=1 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.maintenance_location_id))
50. 833.527 833.527 ↑ 1.0 1 833,527

Index Scan using pk_maintenance_priorities on maintenance_priorities mpr (cost=0.28..0.30 rows=1 width=632) (actual time=0.001..0.001 rows=1 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.maintenance_priority_id))
51. 0.011 0.026 ↑ 1.0 57 1

Hash (cost=1.71..1.71 rows=57 width=40) (actual time=0.025..0.026 rows=57 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
52. 0.015 0.015 ↑ 1.0 57 1

Seq Scan on work_order_materials_cost (cost=0.00..1.71 rows=57 width=40) (actual time=0.008..0.015 rows=57 loops=1)

  • Filter: (cid = 235)
53. 0.005 0.014 ↑ 1.0 25 1

Hash (cost=1.31..1.31 rows=25 width=40) (actual time=0.014..0.014 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
54. 0.009 0.009 ↑ 1.0 25 1

Seq Scan on work_order_labors_cost (cost=0.00..1.31 rows=25 width=40) (actual time=0.006..0.009 rows=25 loops=1)

  • Filter: (cid = 235)
55. 833.527 833.527 ↑ 1.0 1 833,527

Index Scan using pk_properties on properties p (cost=0.28..0.31 rows=1 width=29) (actual time=0.001..0.001 rows=1 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.property_id))
56. 833.527 833.527 ↑ 1.0 1 833,527

Index Scan using pk_property_units on property_units pu (cost=0.29..0.32 rows=1 width=211) (actual time=0.001..0.001 rows=1 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.property_unit_id))
57. 833.527 833.527 ↑ 1.0 1 833,527

Index Scan using pk_property_buildings on property_buildings pb (cost=0.28..0.32 rows=1 width=169) (actual time=0.001..0.001 rows=1 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = COALESCE(mr.property_building_id, pu.property_building_id)))
58. 0.000 0.000 ↓ 0.0 0 833,527

Index Scan using pk_unit_spaces on unit_spaces us (cost=0.42..0.45 rows=1 width=22) (actual time=0.000..0.000 rows=0 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.unit_space_id))
  • Filter: ((deleted_on IS NULL) OR (deleted_on > '2019-12-31 00:00:00+00'::timestamp with time zone))
59. 0.003 0.017 ↑ 1.0 7 1

Hash (cost=2.07..2.07 rows=7 width=122) (actual time=0.016..0.017 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
60. 0.014 0.014 ↑ 1.0 7 1

Seq Scan on unit_space_status_types usst (cost=0.00..2.07 rows=7 width=122) (actual time=0.008..0.014 rows=7 loops=1)

61. 0.000 0.000 ↓ 0.0 0 833,527

Index Scan using pk_unit_types on unit_types ut (cost=0.28..0.33 rows=1 width=161) (actual time=0.000..0.000 rows=0 loops=833,527)

  • Index Cond: ((cid = us.cid) AND (cid = 235) AND (id = COALESCE(pu.unit_type_id, us.unit_type_id)))
62. 833.527 833.527 ↓ 0.0 0 833,527

Index Scan using unq_idx_maintenance_request_notes_is_closing_note on maintenance_request_notes (cost=0.28..0.30 rows=1 width=160) (actual time=0.001..0.001 rows=0 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = mr.cid) AND (cid = 235) AND (maintenance_request_id = mr.id) AND (maintenance_request_id = mr.id))
63. 0.000 1,667.054 ↓ 0.0 0 833,527

Subquery Scan on mrn_internal (cost=8.32..8.34 rows=1 width=160) (actual time=0.002..0.002 rows=0 loops=833,527)

  • Filter: ((mrn_internal.cid = 235) AND (mrn_internal.cid = mr.cid) AND (mrn_internal.maintenance_request_id = mr.id))
64. 0.000 1,667.054 ↓ 0.0 0 833,527

Limit (cost=8.32..8.32 rows=1 width=164) (actual time=0.002..0.002 rows=0 loops=833,527)

65. 833.527 1,667.054 ↓ 0.0 0 833,527

Sort (cost=8.32..8.32 rows=1 width=164) (actual time=0.002..0.002 rows=0 loops=833,527)

  • Sort Key: maintenance_request_notes_1.id DESC
  • Sort Method: quicksort Memory: 25kB
66. 833.527 833.527 ↓ 0.0 0 833,527

Index Scan using idx_maintenance_request_notes_maintenance_request_id on maintenance_request_notes maintenance_request_notes_1 (cost=0.29..8.31 rows=1 width=164) (actual time=0.001..0.001 rows=0 loops=833,527)

  • Index Cond: (maintenance_request_id = mr.id)
  • Filter: ((NOT is_closing_note) AND (is_resident_visible <> 1) AND (cid = mr.cid))
  • Rows Removed by Filter: 0
67. 0.000 0.000 ↓ 0.0 0 833,527

Index Scan using pk_ap_payees on ap_payees ap (cost=0.29..0.31 rows=1 width=22) (actual time=0.000..0.000 rows=0 loops=833,527)

  • Index Cond: ((cid = mr.cid) AND (cid = 235) AND (id = mr.ap_payee_id))
68. 833.527 2,500.581 ↓ 0.0 0 833,527

Limit (cost=21.24..21.24 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=833,527)

69. 833.527 1,667.054 ↓ 0.0 0 833,527

Sort (cost=21.24..21.24 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=833,527)

  • Sort Key: maintenance_request_labors.id
  • Sort Method: quicksort Memory: 25kB
70. 0.000 833.527 ↓ 0.0 0 833,527

Bitmap Heap Scan on maintenance_request_labors (cost=4.32..21.23 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=833,527)

  • Recheck Cond: (mr.id = maintenance_request_id)
  • Filter: (mr.cid = cid)
  • Heap Blocks: exact=18
71. 833.527 833.527 ↓ 0.0 0 833,527

Bitmap Index Scan on idx_maintenance_request_labors_maintenance_request_id (cost=0.00..4.32 rows=5 width=0) (actual time=0.001..0.001 rows=0 loops=833,527)

  • Index Cond: (maintenance_request_id = mr.id)
72. 1,667.054 1,667.054 ↑ 1.0 1 833,527

Index Scan using uk_property_maintenance_priorities_property_id_maintenance_prio on property_maintenance_priorities pmp (cost=0.42..0.45 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=833,527)

  • Index Cond: ((property_id = mr.property_id) AND (maintenance_priority_id = mr.maintenance_priority_id) AND (cid = mr.cid) AND (cid = mr.cid) AND (cid = 235))
73. 0.021 252.647 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=4) (actual time=252.647..252.647 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
74. 252.626 252.626 ↑ 1.0 4 1

Seq Scan on maintenance_status_types msts (cost=0.00..1.04 rows=4 width=4) (actual time=252.621..252.626 rows=4 loops=1)

75. 0.021 0.380 ↑ 1.8 102 1

Hash (cost=665.74..665.74 rows=182 width=16) (actual time=0.380..0.380 rows=102 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
76. 0.329 0.359 ↑ 1.8 102 1

Bitmap Heap Scan on property_preferences pp (cost=9.84..665.74 rows=182 width=16) (actual time=0.046..0.359 rows=102 loops=1)

  • Recheck Cond: ((key)::text = 'ENABLE_RESPONSE_TIME'::text)
  • Heap Blocks: exact=56
77. 0.030 0.030 ↑ 1.8 102 1

Bitmap Index Scan on idx_property_preferences_key (cost=0.00..9.79 rows=182 width=0) (actual time=0.030..0.030 rows=102 loops=1)

  • Index Cond: ((key)::text = 'ENABLE_RESPONSE_TIME'::text)
78. 0.000 1,667.054 ↓ 0.0 0 833,527

Limit (cost=16.51..16.52 rows=1 width=44) (actual time=0.002..0.002 rows=0 loops=833,527)

79. 833.527 1,667.054 ↓ 0.0 0 833,527

Sort (cost=16.51..16.52 rows=1 width=44) (actual time=0.002..0.002 rows=0 loops=833,527)

  • Sort Key: et1.event_datetime DESC
  • Sort Method: quicksort Memory: 25kB
80. 0.000 833.527 ↓ 0.0 0 833,527

Nested Loop Left Join (cost=0.43..16.50 rows=1 width=44) (actual time=0.001..0.001 rows=0 loops=833,527)

  • Filter: (((et2.scheduled_end_datetime)::date >= '2019-12-31'::date) OR (et2.scheduled_end_datetime IS NULL))
81. 833.527 833.527 ↓ 0.0 0 833,527

Index Scan using idx_events_property_unit_id on events et1 (cost=0.29..8.31 rows=1 width=52) (actual time=0.001..0.001 rows=0 loops=833,527)

  • Index Cond: (property_unit_id = pu.id)
  • Filter: ((notes IS NOT NULL) AND (cid = 235) AND (event_type_id = 436) AND ((scheduled_datetime)::date < '2020-01-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 0
82. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_events_associated_event_id on events et2 (cost=0.14..8.18 rows=1 width=16) (never executed)

  • Index Cond: (associated_event_id = et1.id)
  • Filter: ((cid = 235) AND (event_type_id = 436) AND (default_event_result_id = 2) AND (property_unit_id = pu.id) AND (property_unit_id = et1.property_unit_id))