explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BRNoT

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 18.837 ↑ 1.0 1 1

Aggregate (cost=79.15..79.16 rows=1 width=8) (actual time=18.837..18.837 rows=1 loops=1)

  • Output: count(0)
  • Buffers: shared hit=8334
2. 0.006 18.831 ↓ 3.0 3 1

Subquery Scan on a (cost=58.56..79.15 rows=1 width=0) (actual time=6.250..18.831 rows=3 loops=1)

  • Output: a.id, a.cid, a.property_id, a.property_unit_id, a.unit_space_id, a.event_type_id, a.event_sub_type_id, a.event_result_id, a.default_event_result_id, a.associated_event_id, a.ps_product_id, a.old_stage_id, a.new_stage_id, a.old_status_id, a.new_status_id, a.company_employee_id, a.data_reference_id, a.integration_result_id, a.lease_id, a.lease_interval_id, a.customer_id, a.scheduled_task_id, a.remote_primary_key, a.calendar_event_key, a.scheduled_datetime, a.scheduled_end_datetime, a.event_datetime, a.event_handle, a.title, a.notes, a.details, a.ip_address, a.do_not_export, a.is_resident, a.is_deleted, a.updated_by, a.updated_on, a.created_by, a.created_on, a.organization_contract_id, a.id_1, a.lease_interval_id_1, a.application_id, a.lease_interval_type_id, a.applicant_id, a.applicant_name, a.phone_number, a.email_address, a.move_in_date, a.agent_name, a.application_status, a.property_name, a.unit_number, a.property_remote_primary_key, a.ar_transaction_id, a.reference_id, a.last_progression_days, a.last_progression_event_scheduled_datetime, a.last_contacted_event_type_id, a.last_contact_days, a.last_contacted_on, a.last_note, a.last_contact_notes_days, a.last_note_date, a.last_attempt_event_type_id, a.last_attempt_days, a.last_attempt_scheduled_datetime, a.priority
  • Filter: (a.priority = ANY ('{1,2,3}'::integer[]))
  • Buffers: shared hit=8334
3. 0.012 18.825 ↓ 3.0 3 1

Unique (cost=58.56..79.13 rows=1 width=2,559) (actual time=6.248..18.825 rows=3 loops=1)

  • Output: NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, npe.lease_interval_id, NULL::integer, NULL::integer, NULL::character varying(40), NULL::character varying(240), NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::text, NULL::character varying(240), NULL::text, NULL::jsonb, NULL::character varying(50), NULL::boolean, NULL::boolean, NULL::boolean, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::character varying, NULL::character varying(30), NULL::character varying(240), NULL::date, NULL::text, NULL::text, NULL::character varying(50), NULL::text, NULL::character varying(64), NULL::integer, NULL::integer, NULL::double precision, NULL::timestamp with time zone, NULL::integer, NULL::double precision, NULL::timestamp with time zone, NULL::text, NULL::double precision, NULL::timestamp with time zone, NULL::integer, NULL::double precision, NULL::timestamp with time zone, (CASE WHEN ((btrim((dp.residents_not_progressing ->> 'urgent_last_contact_more_than'::text)) <> ''::text) AND (ei.scheduled_datetime IS NOT NULL) AND (now() >= ((ei.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'urgent_last_contact_more_than'::text))::integer)::double precision)))) THEN 3 WHEN ((btrim((dp.residents_not_progressing ->> 'urgent_last_attempt_more_than'::text)) <> ''::text) AND (ei_3.scheduled_datetime IS NOT NULL) AND (now() >= ((ei_3.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'urgent_last_attempt_more_than'::text))::integer)::double precision)))) THEN 3 WHEN ((btrim((dp.residents_not_progressing ->> 'important_last_contact_more_than'::text)) <> ''::text) AND (ei.scheduled_datetime IS NOT NULL) AND (now() >= ((ei.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'important_last_contact_more_than'::text))::integer)::double precision)))) THEN 2 WHEN ((btrim((dp.residents_not_progressing ->> 'important_last_attempt_more_than'::text)) <> ''::text) AND (ei_3.scheduled_datetime IS NOT NULL) AND (now() >= ((ei_3.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'important_last_attempt_more_than'::text))::integer)::double precision)))) THEN 2 WHEN ((btrim((dp.residents_not_progressing ->> 'important_residents_application_progressed_to_stage_status_ids'::text)) <> ''::text) AND (ass.id = ANY (((dp.residents_not_progressing ->> 'important_residents_application_progressed_to_stage_status_ids'::text))::integer[]))) THEN 2 WHEN ((btrim((dp.residents_not_progressing ->> 'urgent_residents_application_progressed_to_stage_status_ids'::text)) <> ''::text) AND (ass.id = ANY (((dp.residents_not_progressing ->> 'urgent_residents_application_progressed_to_stage_status_ids'::text))::integer[]))) THEN 3 ELSE 1 END)
  • Buffers: shared hit=8334
4. 0.050 18.813 ↓ 13.0 13 1

Nested Loop Left Join (cost=58.56..79.13 rows=1 width=2,559) (actual time=6.246..18.813 rows=13 loops=1)

  • Output: NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, npe.lease_interval_id, NULL::integer, NULL::integer, NULL::character varying(40), NULL::character varying(240), NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::text, NULL::character varying(240), NULL::text, NULL::jsonb, NULL::character varying(50), NULL::boolean, NULL::boolean, NULL::boolean, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::character varying, NULL::character varying(30), NULL::character varying(240), NULL::date, NULL::text, NULL::text, NULL::character varying(50), NULL::text, NULL::character varying(64), NULL::integer, NULL::integer, NULL::double precision, NULL::timestamp with time zone, NULL::integer, NULL::double precision, NULL::timestamp with time zone, NULL::text, NULL::double precision, NULL::timestamp with time zone, NULL::integer, NULL::double precision, NULL::timestamp with time zone, CASE WHEN ((btrim((dp.residents_not_progressing ->> 'urgent_last_contact_more_than'::text)) <> ''::text) AND (ei.scheduled_datetime IS NOT NULL) AND (now() >= ((ei.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'urgent_last_contact_more_than'::text))::integer)::double precision)))) THEN 3 WHEN ((btrim((dp.residents_not_progressing ->> 'urgent_last_attempt_more_than'::text)) <> ''::text) AND (ei_3.scheduled_datetime IS NOT NULL) AND (now() >= ((ei_3.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'urgent_last_attempt_more_than'::text))::integer)::double precision)))) THEN 3 WHEN ((btrim((dp.residents_not_progressing ->> 'important_last_contact_more_than'::text)) <> ''::text) AND (ei.scheduled_datetime IS NOT NULL) AND (now() >= ((ei.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'important_last_contact_more_than'::text))::integer)::double precision)))) THEN 2 WHEN ((btrim((dp.residents_not_progressing ->> 'important_last_attempt_more_than'::text)) <> ''::text) AND (ei_3.scheduled_datetime IS NOT NULL) AND (now() >= ((ei_3.scheduled_datetime)::timestamp without time zone + ('1 day'::interval * (((dp.residents_not_progressing ->> 'important_last_attempt_more_than'::text))::integer)::double precision)))) THEN 2 WHEN ((btrim((dp.residents_not_progressing ->> 'important_residents_application_progressed_to_stage_status_ids'::text)) <> ''::text) AND (ass.id = ANY (((dp.residents_not_progressing ->> 'important_residents_application_progressed_to_stage_status_ids'::text))::integer[]))) THEN 2 WHEN ((btrim((dp.residents_not_progressing ->> 'urgent_residents_application_progressed_to_stage_status_ids'::text)) <> ''::text) AND (ass.id = ANY (((dp.residents_not_progressing ->> 'urgent_residents_application_progressed_to_stage_status_ids'::text))::integer[]))) THEN 3 ELSE 1 END
  • Buffers: shared hit=8334
5. 0.022 18.165 ↓ 13.0 13 1

Nested Loop Left Join (cost=54.70..75.07 rows=1 width=121) (actual time=6.196..18.165 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.property_id, ca.application_datetime, ass.id, dp.residents_not_progressing, pp1.id, pp1.value, pp2.id, ei.scheduled_datetime
  • Buffers: shared hit=8204
6. 0.038 17.987 ↓ 13.0 13 1

Nested Loop Left Join (cost=52.04..72.39 rows=1 width=121) (actual time=6.178..17.987 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.property_id, ca.application_datetime, ass.id, dp.residents_not_progressing, pp1.id, pp1.value, pp2.id, ei.scheduled_datetime
  • Filter: CASE WHEN ((e_1.id IS NULL) OR (ei_1.scheduled_datetime <> e_1.scheduled_datetime)) THEN (ass.id = ANY ('{25,26,31,32,43,44,27,28}'::integer[])) ELSE ((ca.application_stage_id = 4) AND (ca.lease_status_type_id = ANY ('{4,5}'::integer[]))) END
  • Buffers: shared hit=8138
7. 0.030 7.679 ↓ 13.0 13 1

Nested Loop Left Join (cost=29.02..49.33 rows=1 width=149) (actual time=5.161..7.679 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.application_stage_id, ca.lease_status_type_id, ass.id, dp.residents_not_progressing, pp1.id, pp1.value, pp2.id, ei.scheduled_datetime
  • Buffers: shared hit=2673
8. 0.028 7.428 ↓ 13.0 13 1

Nested Loop Left Join (cost=23.81..44.10 rows=1 width=141) (actual time=5.133..7.428 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.application_stage_id, ca.lease_status_type_id, ass.id, dp.residents_not_progressing, pp1.id, pp1.value, pp2.id
  • Inner Unique: true
  • Buffers: shared hit=2543
9. 0.031 7.348 ↓ 13.0 13 1

Nested Loop Left Join (cost=23.39..43.44 rows=1 width=145) (actual time=5.125..7.348 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_status_type_id, ass.id, dp.residents_not_progressing, pp1.id, pp1.value
  • Inner Unique: true
  • Buffers: shared hit=2491
10. 0.040 7.252 ↓ 13.0 13 1

Nested Loop Left Join (cost=22.97..42.78 rows=1 width=122) (actual time=5.116..7.252 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_status_type_id, ass.id, dp.residents_not_progressing
  • Buffers: shared hit=2452
11. 0.034 7.173 ↓ 13.0 13 1

Nested Loop Left Join (cost=22.83..42.61 rows=1 width=60) (actual time=5.109..7.173 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_status_type_id, ass.id
  • Inner Unique: true
  • Buffers: shared hit=2426
12. 0.021 7.100 ↓ 13.0 13 1

Nested Loop Left Join (cost=22.54..42.27 rows=1 width=68) (actual time=5.106..7.100 rows=13 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_status_type_id, ass.id, at.cid, at.ar_code_id
  • Buffers: shared hit=2390
13. 0.006 6.935 ↓ 3.0 3 1

Nested Loop Left Join (cost=22.11..35.12 rows=1 width=64) (actual time=5.079..6.935 rows=3 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_id, ca.lease_status_type_id, ass.id
  • Inner Unique: true
  • Buffers: shared hit=2297
14. 0.006 6.926 ↓ 3.0 3 1

Nested Loop Left Join (cost=21.82..34.80 rows=1 width=68) (actual time=5.076..6.926 rows=3 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_id, ca.leasing_agent_id, ca.lease_status_type_id, ass.id
  • Inner Unique: true
  • Buffers: shared hit=2297
15. 0.010 6.899 ↓ 3.0 3 1

Nested Loop Left Join (cost=21.40..33.73 rows=1 width=72) (actual time=5.067..6.899 rows=3 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.property_id, ca.lease_id, ca.primary_applicant_id, ca.leasing_agent_id, ca.lease_status_type_id, ass.id
  • Buffers: shared hit=2285
16. 0.008 6.856 ↓ 3.0 3 1

Nested Loop (cost=21.26..33.26 rows=1 width=76) (actual time=5.057..6.856 rows=3 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.lease_interval_type_id, ca.application_status_id, ca.property_id, ca.lease_id, ca.primary_applicant_id, ca.leasing_agent_id, ca.lease_status_type_id
  • Inner Unique: true
  • Buffers: shared hit=2261
17. 0.258 6.827 ↓ 3.0 3 1

Nested Loop (cost=20.84..32.54 rows=1 width=76) (actual time=5.046..6.827 rows=3 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime, ca.application_datetime, ca.cid, ca.application_stage_id, ca.lease_interval_type_id, ca.application_status_id, ca.property_id, ca.lease_id, ca.primary_applicant_id, ca.leasing_agent_id, ca.lease_status_type_id
  • Join Filter: CASE WHEN (e_1.id IS NULL) THEN (((ca.application_stage_id = 4) OR ((ca.application_stage_id = 3) AND (ca.lease_interval_type_id = 3))) AND (ca.lease_interval_type_id = ANY ('{3,4}'::integer[])) AND ((ca.application_stage_id <> 3) OR (ca.application_status_id <> 6)) AND ((ca.application_stage_id <> 4) OR (ca.application_status_id <> 6)) AND ((ca.application_stage_id <> 4) OR (ca.application_status_id <> 3)) AND ((ca.application_stage_id <> 4) OR (ca.application_status_id <> 4))) ELSE (ca.application_stage_id = 4) END
  • Rows Removed by Join Filter: 127
  • Buffers: shared hit=2249
18. 0.154 6.049 ↓ 130.0 130 1

Nested Loop (cost=20.41..29.85 rows=1 width=32) (actual time=4.022..6.049 rows=130 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime
  • Inner Unique: true
  • Buffers: shared hit=1722
19. 0.163 5.635 ↓ 130.0 130 1

Nested Loop Left Join (cost=20.13..27.04 rows=1 width=32) (actual time=4.017..5.635 rows=130 loops=1)

  • Output: npe.lease_interval_id, npe.cid, npe.lease_id, npe.customer_id, npe.property_id, e_1.id, e_1.scheduled_datetime
  • Buffers: shared hit=1332
20. 0.126 4.302 ↓ 130.0 130 1

Subquery Scan on npe (cost=18.85..19.04 rows=1 width=20) (actual time=3.998..4.302 rows=130 loops=1)

  • Output: npe.id, npe.cid, npe.property_id, npe.property_unit_id, npe.unit_space_id, npe.event_type_id, npe.event_sub_type_id, npe.event_result_id, npe.default_event_result_id, npe.associated_event_id, npe.ps_product_id, npe.old_stage_id, npe.new_stage_id, npe.old_status_id, npe.new_status_id, npe.company_employee_id, npe.data_reference_id, npe.integration_result_id, npe.lease_id, npe.lease_interval_id, npe.customer_id, npe.scheduled_task_id, npe.remote_primary_key, npe.calendar_event_key, npe.scheduled_datetime, npe.scheduled_end_datetime, npe.event_datetime, npe.event_handle, npe.title, npe.notes, npe.details, npe.ip_address, npe.do_not_export, npe.is_resident, npe.is_deleted, npe.updated_by, npe.updated_on, npe.created_by, npe.created_on, npe.organization_contract_id
  • Filter: (npe.cid = 11400)
  • Buffers: shared hit=560
21. 0.124 4.176 ↓ 11.8 130 1

Unique (cost=18.85..18.90 rows=11 width=1,451) (actual time=3.997..4.176 rows=130 loops=1)

  • Output: NULL::integer, e.cid, e.property_id, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, e.lease_id, e.lease_interval_id, e.customer_id, NULL::integer, NULL::character varying(40), NULL::character varying(240), e.scheduled_datetime, NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::text, NULL::character varying(240), NULL::text, NULL::jsonb, NULL::character varying(50), NULL::boolean, NULL::boolean, NULL::boolean, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::timestamp with time zone, NULL::integer
  • Buffers: shared hit=560
22. 0.170 4.052 ↓ 11.8 130 1

Sort (cost=18.85..18.88 rows=11 width=1,451) (actual time=3.996..4.052 rows=130 loops=1)

  • Output: NULL::integer, e.cid, e.property_id, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, e.lease_id, e.lease_interval_id, e.customer_id, NULL::integer, NULL::character varying(40), NULL::character varying(240), e.scheduled_datetime, NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::text, NULL::character varying(240), NULL::text, NULL::jsonb, NULL::character varying(50), NULL::boolean, NULL::boolean, NULL::boolean, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::timestamp with time zone, NULL::integer
  • Sort Key: e.lease_interval_id, e.scheduled_datetime DESC
  • Sort Method: quicksort Memory: 35kB
  • Buffers: shared hit=560
23. 0.222 3.882 ↓ 11.8 130 1

Nested Loop Anti Join (cost=0.96..18.66 rows=11 width=1,451) (actual time=3.187..3.882 rows=130 loops=1)

  • Output: NULL::integer, e.cid, e.property_id, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, NULL::integer, e.lease_id, e.lease_interval_id, e.customer_id, NULL::integer, NULL::character varying(40), NULL::character varying(240), e.scheduled_datetime, NULL::timestamp with time zone, NULL::timestamp with time zone, NULL::text, NULL::character varying(240), NULL::text, NULL::jsonb, NULL::character varying(50), NULL::boolean, NULL::boolean, NULL::boolean, NULL::integer, NULL::timestamp with time zone, NULL::integer, NULL::timestamp with time zone, NULL::integer
  • Buffers: shared hit=560
24. 0.124 3.508 ↓ 13.8 152 1

Nested Loop (cost=0.68..14.85 rows=11 width=32) (actual time=3.183..3.508 rows=152 loops=1)

  • Output: e.cid, e.property_id, e.lease_id, e.lease_interval_id, e.customer_id, e.scheduled_datetime, e.event_result_id
  • Buffers: shared hit=362
25. 3.170 3.170 ↑ 1.0 1 1

Function Scan on public.load_properties lp (cost=0.25..0.88 rows=1 width=4) (actual time=3.169..3.170 rows=1 loops=1)

  • Output: lp.cid, lp.property_id, lp.property_type_id, lp.is_student_property, lp.is_disabled, lp.is_test
  • Function Call: load_properties('{11400}'::integer[], '{165663}'::integer[], '{}'::integer[], false, '{}'::json)
  • Filter: (lp.is_disabled = 0)
  • Buffers: shared hit=281
26. 0.214 0.214 ↓ 13.8 152 1

Index Scan using idx_events_cid_etid_pid_event_datetime on public.events e (cost=0.43..13.87 rows=11 width=32) (actual time=0.011..0.214 rows=152 loops=1)

  • Output: e.id, e.cid, e.property_id, e.property_unit_id, e.unit_space_id, e.event_type_id, e.event_sub_type_id, e.event_result_id, e.default_event_result_id, e.associated_event_id, e.ps_product_id, e.old_stage_id, e.new_stage_id, e.old_status_id, e.new_status_id, e.company_employee_id, e.data_reference_id, e.integration_result_id, e.lease_id, e.lease_interval_id, e.customer_id, e.scheduled_task_id, e.remote_primary_key, e.calendar_event_key, e.scheduled_datetime, e.scheduled_end_datetime, e.event_datetime, e.event_handle, e.title, e.notes, e.details, e.ip_address, e.do_not_export, e.is_resident, e.is_deleted, e.updated_by, e.updated_on, e.created_by, e.created_on, e.organization_contract_id
  • Index Cond: ((e.cid = 11400) AND (e.event_type_id = 275) AND (e.property_id = lp.property_id))
  • Filter: (NOT e.is_deleted)
  • Buffers: shared hit=81
27. 0.152 0.152 ↓ 0.0 0 152

Index Scan using idx_event_results on public.event_results er (cost=0.28..0.34 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=152)

  • Output: er.id, er.cid, er.default_event_result_ids, er.remote_primary_key, er.name, er.description, er.is_conclusive, er.is_published, er.is_system, er.order_num, er.deleted_by, er.deleted_on, er.updated_by, er.updated_on, er.created_by, er.created_on, er.mapping_id, er.details
  • Index Cond: (er.id = e.event_result_id)
  • Filter: (er.is_system AND (er.cid = 11400) AND (er.cid = e.cid) AND (2 = ANY (er.default_event_result_ids)))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=198
28. 0.130 1.170 ↓ 0.0 0 130

Nested Loop (cost=1.28..7.98 rows=1 width=24) (actual time=0.009..0.009 rows=0 loops=130)

  • Output: e_1.id, NULL::integer, NULL::integer, NULL::integer, e_1.scheduled_datetime
  • Join Filter: (e_1.data_reference_id = fa.file_id)
  • Buffers: shared hit=772
29. 0.130 1.040 ↓ 0.0 0 130

Nested Loop Left Join (cost=0.85..5.31 rows=1 width=24) (actual time=0.008..0.008 rows=0 loops=130)

  • Output: e_1.id, e_1.scheduled_datetime, e_1.data_reference_id, e_1.cid, e_1.lease_id
  • Join Filter: (e_1.data_reference_id = ev.data_reference_id)
  • Filter: (ev.id IS NULL)
  • Buffers: shared hit=772
30. 0.910 0.910 ↓ 0.0 0 130

Index Scan using idx_events_lease_id on public.events e_1 (cost=0.43..2.65 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=130)

  • Output: e_1.id, e_1.cid, e_1.property_id, e_1.property_unit_id, e_1.unit_space_id, e_1.event_type_id, e_1.event_sub_type_id, e_1.event_result_id, e_1.default_event_result_id, e_1.associated_event_id, e_1.ps_product_id, e_1.old_stage_id, e_1.new_stage_id, e_1.old_status_id, e_1.new_status_id, e_1.company_employee_id, e_1.data_reference_id, e_1.integration_result_id, e_1.lease_id, e_1.lease_interval_id, e_1.customer_id, e_1.scheduled_task_id, e_1.remote_primary_key, e_1.calendar_event_key, e_1.scheduled_datetime, e_1.scheduled_end_datetime, e_1.event_datetime, e_1.event_handle, e_1.title, e_1.notes, e_1.details, e_1.ip_address, e_1.do_not_export, e_1.is_resident, e_1.is_deleted, e_1.updated_by, e_1.updated_on, e_1.created_by, e_1.created_on, e_1.organization_contract_id
  • Index Cond: ((e_1.cid = npe.cid) AND (e_1.lease_id = npe.lease_id))
  • Filter: ((e_1.event_type_id = 309) AND (npe.property_id = e_1.property_id))
  • Rows Removed by Filter: 5
  • Buffers: shared hit=772
31. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_events_lease_id on public.events ev (cost=0.43..2.65 rows=1 width=8) (never executed)

  • Output: ev.id, ev.cid, ev.property_id, ev.property_unit_id, ev.unit_space_id, ev.event_type_id, ev.event_sub_type_id, ev.event_result_id, ev.default_event_result_id, ev.associated_event_id, ev.ps_product_id, ev.old_stage_id, ev.new_stage_id, ev.old_status_id, ev.new_status_id, ev.company_employee_id, ev.data_reference_id, ev.integration_result_id, ev.lease_id, ev.lease_interval_id, ev.customer_id, ev.scheduled_task_id, ev.remote_primary_key, ev.calendar_event_key, ev.scheduled_datetime, ev.scheduled_end_datetime, ev.event_datetime, ev.event_handle, ev.title, ev.notes, ev.details, ev.ip_address, ev.do_not_export, ev.is_resident, ev.is_deleted, ev.updated_by, ev.updated_on, ev.created_by, ev.created_on, ev.organization_contract_id
  • Index Cond: ((ev.cid = npe.cid) AND (ev.lease_id = npe.lease_id))
  • Filter: (ev.event_type_id = 310)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_file_associations_cid_customer_id on public.file_associations fa (cost=0.43..2.65 rows=1 width=12) (never executed)

  • Output: fa.id, fa.cid, fa.file_id, fa.property_id, fa.document_id, fa.applicant_id, fa.quote_id, fa.application_id, fa.customer_id, fa.customer_pet_id, fa.lease_id, fa.ar_transaction_id, fa.inspection_response_id, fa.maintenance_request_id, fa.company_user_report_history_id, fa.ap_payee_id, fa.ap_payee_location_id, fa.ap_header_id, fa.ap_payment_id, fa.ap_payment_batch_id, fa.check_component_type_id, fa.bank_account_id, fa.gl_header_id, fa.gl_reconciliation_id, fa.gl_header_schedule_id, fa.chore_id, fa.vp_document_id, fa.company_employee_id, fa.company_owner_id, fa.system_message_id, fa.campaign_id, fa.scheduled_email_id, fa.scheduled_task_email_id, fa.scheduled_charge_id, fa.esa_file_id, fa.customer_data_verification_id, fa.budget_change_order_id, fa.subsidy_certification_id, fa.subsidy_hap_request_id, fa.subsidy_special_claim_id, fa.military_mac_period_id, fa.ip_address, fa.remote_primary_key, fa.signature, fa.order_num, fa.require_sign, fa.sign_initiated_on, fa.file_signed_on, fa.approved_by, fa.approved_on, fa.deleted_by, fa.deleted_on, fa.updated_by, fa.updated_on, fa.created_by, fa.created_on, fa.violation_id, fa.resident_insurance_policy_id, fa.owner_id, fa.organization_id, fa.organization_contract_id
  • Index Cond: ((fa.cid = npe.cid) AND (fa.customer_id = npe.customer_id))
  • Filter: ((fa.file_signed_on IS NULL) AND (fa.deleted_by IS NULL) AND (fa.id IS NOT NULL) AND (fa.lease_id = npe.lease_id))
33. 0.260 0.260 ↑ 1.0 1 130

Index Scan using idx_properties_id on public.properties p (cost=0.28..2.50 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=130)

  • Output: p.id, p.cid, p.property_id, p.property_type_id, p.company_region_id, p.time_zone_id, p.owner_id, p.account_id, p.occupancy_type_ids, p.remote_primary_key, p.property_name, p.lookup_code, p.country_code, p.vaultware_number, p.min_rent, p.max_rent, p.min_square_feet, p.max_square_feet, p.min_bedrooms, p.max_bedrooms, p.min_bathrooms, p.max_bathrooms, p.number_of_units, p.year_built, p.year_remodeled, p.short_description, p.full_description, p.driving_directions, p.termination_reason, p.termination_date, p.details, p.allows_cats, p.allows_dogs, p.has_availability, p.is_disabled, p.is_test, p.is_managerial, p.order_num, p.imported_on, p.disabled_on, p.updated_by, p.updated_on, p.created_by, p.created_on, p.locale_code, p.default_occupancy_type_id
  • Index Cond: (p.id = npe.property_id)
  • Filter: (p.cid = 11400)
  • Buffers: shared hit=390
34. 0.520 0.520 ↑ 1.0 1 130

Index Scan using idx_cached_applications_lease_interval_id on public.cached_applications ca (cost=0.42..2.65 rows=1 width=48) (actual time=0.004..0.004 rows=1 loops=130)

  • Output: ca.id, ca.cid, ca.property_id, ca.lease_id, ca.lease_interval_id, ca.lease_interval_type_id, ca.lease_status_type_id, ca.lease_type_id, ca.lead_conversion_type, ca.application_stage_id, ca.application_status_id, ca.application_step_id, ca.max_application_stage_id, ca.max_application_status_id, ca.max_application_step_id, ca.cancellation_list_type_id, ca.cancellation_list_item_id, ca.primary_applicant_id, ca.unit_kind_id, ca.unit_type_id, ca.property_floorplan_id, ca.property_building_id, ca.property_floor_id, ca.property_unit_id, ca.unit_space_id, ca.space_configuration_id, ca.desired_space_configuration_id, ca.screening_id, ca.ps_product_id, ca.application_ps_product_id, ca.lease_ps_product_id, ca.leasing_agent_id, ca.internet_listing_service_id, ca.originating_lead_source_id, ca.converting_lead_source_id, ca.company_application_id, ca.lease_term_id, ca.lease_start_window_id, ca.late_fee_formula_id, ca.combined_application_id, ca.quote_id, ca.sem_ad_group_id, ca.sem_keyword_id, ca.sem_source_id, ca.call_id, ca.website_id, ca.craigslist_post_id, ca.cl_ad_id, ca.traffic_cookie_id, ca.first_event_id, ca.first_event_medium_id, ca.first_leasing_center_event_id, ca.response_event_id, ca.last_event_id, ca.referring_lease_customer_id, ca.lease_signature_type_id, ca.insurance_policy_id, ca.insurance_policy_status_type_id, ca.occupancy_type_id, ca.wait_list_id, ca.wait_list_application_id, ca.wait_list_point_ids, ca.wait_list_points, ca.wait_list_position, ca.wait_list_rejection_count, ca.guest_remote_primary_key, ca.app_remote_primary_key, ca.property_name, ca.building_name, ca.unit_number_cache, ca.display_number, ca.unit_square_feet, ca.unit_prior_application_id, ca.name_first, ca.name_middle, ca.name_last, ca.primary_phone_number, ca.email_address, ca.term_month, ca.lease_start_date, ca.lease_end_date, ca.optimal_monthly_rent_base, ca.optimal_monthly_rent_total, ca.advertised_monthly_rent_base, ca.advertised_monthly_rent_amenity, ca.advertised_monthly_rent_add_on, ca.advertised_monthly_rent_special, ca.advertised_monthly_rent_total, ca.advertised_monthly_other_base, ca.advertised_monthly_other_amenity, ca.advertised_monthly_other_add_on, ca.advertised_monthly_other_special, ca.advertised_monthly_other_total, ca.advertised_one_time_deposit_base, ca.advertised_one_time_deposit_amenity, ca.advertised_one_time_deposit_add_on, ca.advertised_one_time_deposit_special, ca.advertised_one_time_deposit_total, ca.advertised_one_time_application_base, ca.advertised_one_time_application_amenity, ca.advertised_one_time_application_add_on, ca.advertised_one_time_application_special, ca.advertised_one_time_application_total, ca.advertised_one_time_other_base, ca.advertised_one_time_other_amenity, ca.advertised_one_time_other_add_on, ca.advertised_one_time_other_special, ca.advertised_one_time_other_total, ca.executed_monthly_rent_base, ca.executed_monthly_rent_amenity, ca.executed_monthly_rent_add_on, ca.executed_monthly_rent_special, ca.executed_monthly_rent_risk_premium, ca.executed_monthly_rent_pet, ca.executed_monthly_rent_total, ca.executed_monthly_other_base, ca.executed_monthly_other_amenity, ca.executed_monthly_other_add_on, ca.executed_monthly_other_special, ca.executed_monthly_other_risk_premium, ca.executed_monthly_other_pet, ca.executed_monthly_other_total, ca.executed_one_time_deposit_base, ca.executed_one_time_deposit_amenity, ca.executed_one_time_deposit_add_on, ca.executed_one_time_deposit_special, ca.executed_one_time_deposit_risk_premium, ca.executed_one_time_deposit_pet, ca.executed_one_time_deposit_total, ca.executed_one_time_application_base, ca.executed_one_time_application_amenity, ca.executed_one_time_application_add_on, ca.executed_one_time_application_special, ca.executed_one_time_application_risk_premium, ca.executed_one_time_application_pet, ca.executed_one_time_application_total, ca.executed_one_time_other_base, ca.executed_one_time_other_amenity, ca.executed_one_time_other_add_on, ca.executed_one_time_other_special, ca.executed_one_time_other_risk_premium, ca.executed_one_time_other_pet, ca.executed_one_time_other_total, ca.executed_optional_monthly_rent_dog, ca.executed_optional_monthly_rent_cat, ca.executed_optional_monthly_rent_other_pet, ca.executed_optional_monthly_rent_garage, ca.executed_optional_monthly_rent_appliances, ca.executed_optional_monthly_rent_furniture, ca.executed_optional_monthly_rent_furnished, ca.executed_optional_monthly_rent_storage, ca.executed_optional_monthly_rent_parking, ca.executed_optional_monthly_rent_meal_plans, ca.executed_optional_monthly_rent_other_add_on, ca.vehicle_count, ca.household_income, ca.desired_rent_min, ca.desired_rent_max, ca.desired_bedrooms, ca.desired_bathrooms, ca.desired_pets, ca.desired_occupants, ca.desired_amenities, ca.total_responsible, ca.total_not_responsible, ca.total_guarantors, ca.total_non_leasing_applicants, ca.total_applicants, ca.guest_card_field_completions, ca.application_datetime, ca.url_referer, ca.details, ca.quotes_count, ca.conversion_probability, ca.first_contacted_on, ca.time_to_first_response, ca.site_visited_on, ca.property_toured_on, ca.unit_toured_on, ca.blue_moon_application_sent_on, ca.info_approved_on, ca.pre_qualification_completed_on, ca.pre_qualification_approved_on, ca.application_started_on, ca.application_completed_on, ca.application_approved_on, ca.screening_approved_on, ca.lease_generated_on, ca.lease_completed_on, ca.lease_approved_on, ca.cancelled_on, ca.transferred_in_on, ca.transferred_out_on, ca.mute_followups_until, ca.quoted_rent_locked_until, ca.hold_unit_until, ca.wait_list_start_on, ca.wait_list_end_on, ca.requires_capture, ca.is_pet_policy_conflicted, ca.is_lease_partially_generated, ca.is_lead, ca.is_deleted, ca.locked_by, ca.locked_on, ca.updated_by, ca.updated_on, ca.created_by, ca.created_on, ca.application_completed_on_initial, ca.application_approved_on_initial, ca.application_reopened_on, ca.lease_interval_type, ca.lease_status_type, ca.lease_term, ca.lease_start_window_start_date, ca.lease_start_window_end_date, ca.contract_base_rent, ca.contract_amenity_rent, ca.contract_pet_rent, ca.contract_add_on_rent, ca.contract_risk_premium_rent, ca.contract_special_rent, ca.contract_total_rent, ca.contract_base_deposit, ca.contract_amenity_deposit, ca.contract_pet_deposit, ca.contract_add_on_deposit, ca.contract_risk_premium_deposit, ca.contract_special_deposit, ca.contract_total_deposit, ca.contract_base_other, ca.contract_amenity_other, ca.contract_pet_other, ca.contract_add_on_other, ca.contract_risk_premium_other, ca.contract_special_other, ca.contract_total_other
  • Index Cond: (ca.lease_interval_id = npe.lease_interval_id)
  • Filter: (ca.cid = 11400)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=527
35. 0.021 0.021 ↑ 1.0 1 3

Index Scan using pk_cached_leases on public.cached_leases cl (cost=0.42..0.71 rows=1 width=12) (actual time=0.007..0.007 rows=1 loops=3)

  • Output: cl.id, cl.cid, cl.property_id, cl.reimbursing_property_id, cl.owner_id, cl.property_unit_id, cl.unit_space_id, cl.occupancy_type_id, cl.payment_allowance_type_id, cl.primary_customer_id, cl.transfer_lease_id, cl.lease_status_type_id, cl.lease_interval_type_id, cl.termination_list_type_id, cl.active_lease_interval_id, cl.m2m_lease_interval_id, cl.integration_database_id, cl.last_delinquency_note_event_id, cl.subsidy_contract_id, cl.subsidy_contract_type_id, cl.set_aside_id, cl.remote_primary_key, cl.lease_status_type, cl.lease_interval_type, cl.company_name, cl.name_first, cl.name_middle, cl.name_last, cl.primary_phone_number, cl.lease_start_date, cl.lease_end_date, cl.move_in_date, cl.notice_date, cl.move_out_date, cl.collections_start_date, cl.property_name, cl.building_name, cl.unit_number_cache, cl.display_number, cl.resident_balance, cl.financial_balance, cl.total_balance, cl.repayment_balance, cl.deposit_held, cl.move_in_review_completed_on, cl.move_out_review_completed_on, cl.transferred_on, cl.fmo_started_on, cl.fmo_approved_on, cl.fmo_processed_on, cl.renewal_prompt_muted_on, cl.renewal_prompt_muted_until, cl.has_repayment_agreement, cl.is_month_to_month, cl.is_transferring_in, cl.is_multi_slot, cl.updated_by, cl.updated_on, cl.created_by, cl.created_on, cl.lease_sub_status, cl.organization_contract_id, cl.scheduled_move_in_start_time, cl.scheduled_move_in_end_time
  • Index Cond: ((cl.cid = 11400) AND (cl.id = ca.lease_id))
  • Filter: ((cl.lease_status_type_id <> ALL ('{2,6}'::integer[])) AND (ca.property_id = cl.property_id))
  • Buffers: shared hit=12
36. 0.033 0.033 ↑ 1.0 1 3

Index Scan using idx_application_stage_status_lease_interval_type_id on public.application_stage_statuses ass (cost=0.14..0.46 rows=1 width=16) (actual time=0.006..0.011 rows=1 loops=3)

  • Output: ass.id, ass.lease_interval_type_id, ass.application_stage_id, ass.application_status_id, ass.next_application_stage_id, ass.next_application_status_id, ass.stage_name, ass.status_name, ass.is_published, ass.order_num, ass.details
  • Index Cond: (ass.lease_interval_type_id = ca.lease_interval_type_id)
  • Filter: ((ass.application_stage_id = ca.application_stage_id) AND (ass.application_status_id = ca.application_status_id))
  • Rows Removed by Filter: 15
  • Buffers: shared hit=24
37. 0.021 0.021 ↑ 1.0 1 3

Index Scan using idx_applicants_id on public.applicants ap (cost=0.42..1.07 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=3)

  • Output: ap.id, ap.cid, ap.marital_status_type_id, ap.customer_id, ap.originating_customer_id, ap.guest_remote_primary_key, ap.app_remote_primary_key, ap.renewal_remote_primary_key, ap.company_name, ap.name_prefix, ap.name_first, ap.name_middle, ap.name_last, ap.name_suffix, ap.name_maiden, ap.phone_number, ap.mobile_number, ap.work_number, ap.fax_number, ap.email_address, ap.tax_number_encrypted, ap.tax_number_masked, ap.birth_date, ap.gender, ap.height, ap.weight, ap.occupation_id, ap.eye_color, ap.hair_color, ap.dl_number_encrypted, ap.dl_state_code, ap.company_identification_type_id, ap.identification_value, ap.identification_expiration, ap.username, ap.password_encrypted, ap.facebook_user, ap.last_access_on, ap.max_login_attempts, ap.login_error_count, ap.requires_password_change, ap.notes, ap.order_num, ap.updated_by, ap.updated_on, ap.created_by, ap.created_on, ap.alt_name_first, ap.alt_name_middle, ap.alt_name_last, ap.preferred_name, ap.name_last_matronymic
  • Index Cond: (ap.id = ca.primary_applicant_id)
  • Filter: ((ap.cid = 11400) AND (ap.cid = ca.cid))
  • Buffers: shared hit=12
38. 0.003 0.003 ↓ 0.0 0 3

Index Scan using idx_company_employees_id on public.company_employees ce (cost=0.29..0.31 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=3)

  • Output: ce.id, ce.cid, ce.employee_status_type_id, ce.company_manager_id, ce.ap_payee_id, ce.remote_primary_key, ce.name_prefix, ce.name_first, ce.name_middle, ce.name_last, ce.name_suffix, ce.name_maiden, ce.title, ce.role_reference_id, ce.is_employee, ce.birth_date, ce.tax_number_encrypted, ce.email_address, ce.secondary_email_address, ce.phone_number1_type_id, ce.phone_number1, ce.phone_number1_extension, ce.phone_number1_is_published, ce.phone_number2_type_id, ce.phone_number2, ce.phone_number2_extension, ce.phone_number2_is_published, ce.date_started, ce.date_terminated, ce.updated_by, ce.updated_on, ce.created_by, ce.created_on, ce.employee_code, ce.details, ce.preferred_locale_code
  • Index Cond: (ce.id = ca.leasing_agent_id)
  • Filter: ((ce.cid = 11400) AND (ce.cid = ca.cid))
39. 0.144 0.144 ↓ 4.0 4 3

Index Scan using idx_ar_transactions_lease_id on public.ar_transactions at (cost=0.43..7.14 rows=1 width=12) (actual time=0.024..0.048 rows=4 loops=3)

  • Output: at.id, at.cid, at.property_id, at.lease_id, at.lease_interval_id, at.customer_id, at.ar_code_type_id, at.ar_code_id, at.ar_origin_id, at.ar_origin_reference_id, at.ar_origin_object_id, at.ar_trigger_id, at.ar_process_id, at.ar_payment_id, at.ar_payment_split_id, at.accrual_debit_gl_account_id, at.accrual_credit_gl_account_id, at.cash_debit_gl_account_id, at.cash_credit_gl_account_id, at.ar_transaction_id, at.ap_allocation_id, at.ap_detail_id, at.scheduled_charge_id, at.period_id, at.dependent_ar_transaction_id, at.remote_primary_key, at.transaction_datetime, at.transaction_amount, at.transaction_amount_due, at.initial_amount_due, at.reporting_post_date, at.post_date, at.post_month, at.memo, at.internal_memo, at.is_payment_in_kind, at.is_deposit_credit, at.is_reversal, at.is_temporary, at.is_posted, at.is_initial_import, at.has_dependencies, at.is_deleted, at.updated_by, at.updated_on, at.created_by, at.created_on, at.gl_dimension_id, at.details
  • Index Cond: (at.lease_id = ca.lease_id)
  • Filter: ((at.remote_primary_key IS NULL) AND (at.customer_id IS NOT NULL) AND (at.cid = 11400) AND (at.cid = ca.cid))
  • Rows Removed by Filter: 27
  • Buffers: shared hit=93
40. 0.039 0.039 ↑ 1.0 1 13

Index Scan using idx_ar_codes on public.ar_codes ac (cost=0.29..0.32 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=13)

  • Output: ac.id, ac.cid, ac.gl_group_type_id, ac.mode_type_id, ac.ar_code_type_id, ac.ar_origin_id, ac.ar_trigger_type_id, ac.ar_trigger_id, ac.categorization_type_id, ac.debit_gl_account_id, ac.credit_gl_account_id, ac.modified_debit_gl_account_id, ac.write_off_ar_code_id, ac.default_ar_code_id, ac.ar_code_group_id, ac.ar_code_summary_type_id, ac.integration_database_id, ac.ledger_filter_id, ac.round_type_id, ac.recovery_ar_code_id, ac.remote_primary_key, ac.name, ac.description, ac.default_amount, ac.capture_delay_days, ac.capture_on_application_approval, ac.hide_charges, ac.hide_credits, ac.waive_late_fees, ac.post_to_cash, ac.show_move_out_reminder, ac.integrated_only, ac.dont_export, ac.prorate_charges, ac.is_categorization_queued, ac.is_payment_in_kind, ac.is_reserved, ac.is_system, ac.is_disabled, ac.default_amount_is_editable, ac.require_note, ac.order_num, ac.priority_num, ac.categorized_by, ac.categorized_on, ac.updated_by, ac.updated_on, ac.created_by, ac.created_on, ac.apply_to_first_month, ac.apply_to_last_month, ac.details
  • Index Cond: (ac.id = at.ar_code_id)
  • Filter: (((ac.default_ar_code_id IS NULL) OR (ac.default_ar_code_id <> 1101)) AND (ac.cid = 11400) AND (ac.cid = at.cid))
  • Buffers: shared hit=36
41. 0.039 0.039 ↑ 1.0 1 13

Index Scan using pk_dashboard_priorities on public.dashboard_priorities dp (cost=0.14..0.16 rows=1 width=66) (actual time=0.002..0.003 rows=1 loops=13)

  • Output: dp.id, dp.cid, dp.approvals_applications, dp.approvals_invoices, dp.approvals_reversals, dp.approvals_esign_docs, dp.approvals_renewal_offers, dp.approvals_transfers, dp.approvals_purchase_orders, dp.approvals_checks, dp.approvals_utilities, dp.approvals_financial_move_outs, dp.approvals_transactions, dp.leads_assign_agents, dp.leads_never_contacted, dp.leads_follow_up, dp.leads_not_progressing, dp.leads_resident_referrals, dp.leads_answered_calls, dp.leads_unknown_email, dp.applicants_follow_up, dp.applicants_not_progressing, dp.applicants_generate_leases, dp.applicants_missing_insurance, dp.residents_follow_up, dp.residents_move_in_reviews, dp.residents_move_ins, dp.residents_evictions, dp.residents_move_outs, dp.residents_renewals, dp.residents_transfers, dp.residents_rentable_items, dp.residents_insurance, dp.residents_additional_settings, dp.residents_not_progressing, dp.resident_portal_amenity_reservations, dp.resident_portal_classifieds, dp.resident_portal_clubs, dp.resident_portal_concierge, dp.resident_portal_events, dp.maintenance_assign_work_orders, dp.maintenance_work_orders, dp.maintenance_recurring_work_orders, dp.maintenance_make_readies, dp.maintenance_inspections, dp.maintenance_inspection_reviews, dp.financial_payments, dp.financial_check21, dp.financial_deposits, dp.financial_notices, dp.financial_collections, dp.financial_delivery_errors, dp.financial_move_outs, dp.financial_accelerated_rent_credits, dp.updated_by, dp.updated_on, dp.created_by, dp.created_on, dp.approvals_scheduled_charges
  • Index Cond: ((dp.cid = ca.cid) AND (dp.cid = 11400))
  • Buffers: shared hit=26
42. 0.065 0.065 ↓ 0.0 0 13

Index Scan using uk_property_preferences_cid_property_id_key on public.property_preferences pp1 (cost=0.42..0.54 rows=1 width=31) (actual time=0.005..0.005 rows=0 loops=13)

  • Output: pp1.id, pp1.cid, pp1.property_id, pp1.property_setting_key_id, pp1.property_preference_type_id, pp1.key, pp1.value, pp1.updated_by, pp1.updated_on, pp1.created_by, pp1.created_on, pp1.details
  • Index Cond: ((pp1.cid = ca.cid) AND (pp1.cid = 11400) AND (pp1.property_id = ca.property_id) AND ((pp1.key)::text = 'DO_NOT_CONSIDER_MESSAGE_CENTER_CORRESPONDENCE_AS_FOLLOW_UPS'::text))
  • Filter: (pp1.value IS NOT NULL)
  • Buffers: shared hit=39
43. 0.052 0.052 ↑ 1.0 1 13

Index Scan using uk_property_preferences_cid_property_id_key on public.property_preferences pp2 (cost=0.42..0.54 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=13)

  • Output: pp2.id, pp2.cid, pp2.property_id, pp2.property_setting_key_id, pp2.property_preference_type_id, pp2.key, pp2.value, pp2.updated_by, pp2.updated_on, pp2.created_by, pp2.created_on, pp2.details
  • Index Cond: ((pp2.cid = ca.cid) AND (pp2.cid = 11400) AND (pp2.property_id = ca.property_id) AND ((pp2.key)::text = 'DO_NOT_CONSIDER_LEASING_CENTER_COMMUNICATION_AS_FOLLOW_UPS'::text))
  • Filter: (pp2.value IS NOT NULL)
  • Buffers: shared hit=52
44. 0.013 0.221 ↓ 0.0 0 13

Limit (cost=5.21..5.21 rows=1 width=24) (actual time=0.017..0.017 rows=0 loops=13)

  • Output: ei.id, NULL::integer, NULL::integer, NULL::integer, ei.scheduled_datetime
  • Buffers: shared hit=130
45. 0.039 0.208 ↓ 0.0 0 13

Sort (cost=5.21..5.21 rows=1 width=24) (actual time=0.016..0.016 rows=0 loops=13)

  • Output: ei.id, NULL::integer, NULL::integer, NULL::integer, ei.scheduled_datetime
  • Sort Key: ei.scheduled_datetime DESC, ei.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=130
46. 0.026 0.169 ↓ 0.0 0 13

Nested Loop Left Join (cost=0.71..5.20 rows=1 width=24) (actual time=0.013..0.013 rows=0 loops=13)

  • Output: ei.id, NULL::integer, NULL::integer, NULL::integer, ei.scheduled_datetime
  • Inner Unique: true
  • Filter: CASE WHEN (ei.event_type_id = ANY ('{1,17,173}'::integer[])) THEN true WHEN ((ei.event_type_id = 3) AND (ei.event_sub_type_id <> 22)) THEN true WHEN (ei.event_type_id = 4) THEN (2 = ANY (er_1.default_event_result_ids)) ELSE NULL::boolean END
  • Buffers: shared hit=130
47. 0.143 0.143 ↓ 0.0 0 13

Index Scan using idx_events_cid_lease_interval_id_event_datetime on public.events ei (cost=0.42..2.66 rows=1 width=28) (actual time=0.011..0.011 rows=0 loops=13)

  • Output: ei.id, ei.cid, ei.property_id, ei.property_unit_id, ei.unit_space_id, ei.event_type_id, ei.event_sub_type_id, ei.event_result_id, ei.default_event_result_id, ei.associated_event_id, ei.ps_product_id, ei.old_stage_id, ei.new_stage_id, ei.old_status_id, ei.new_status_id, ei.company_employee_id, ei.data_reference_id, ei.integration_result_id, ei.lease_id, ei.lease_interval_id, ei.customer_id, ei.scheduled_task_id, ei.remote_primary_key, ei.calendar_event_key, ei.scheduled_datetime, ei.scheduled_end_datetime, ei.event_datetime, ei.event_handle, ei.title, ei.notes, ei.details, ei.ip_address, ei.do_not_export, ei.is_resident, ei.is_deleted, ei.updated_by, ei.updated_on, ei.created_by, ei.created_on, ei.organization_contract_id
  • Index Cond: ((ei.cid = npe.cid) AND (ei.lease_interval_id = npe.lease_interval_id))
  • Filter: ((NOT ei.is_deleted) AND CASE WHEN (pp1.id IS NOT NULL) THEN (COALESCE(ei.ps_product_id, 0) <> 46) ELSE true END AND CASE WHEN (pp2.id IS NOT NULL) THEN (COALESCE(ei.ps_product_id, 0) <> 28) ELSE true END AND (ei.event_type_id <> 15) AND (ei.event_type_id = ANY ('{1,3,4,5,6,15,17,173}'::integer[])))
  • Rows Removed by Filter: 9
  • Buffers: shared hit=130
48. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_event_results on public.event_results er_1 (cost=0.28..2.50 rows=1 width=33) (never executed)

  • Output: er_1.id, er_1.cid, er_1.default_event_result_ids, er_1.remote_primary_key, er_1.name, er_1.description, er_1.is_conclusive, er_1.is_published, er_1.is_system, er_1.order_num, er_1.deleted_by, er_1.deleted_on, er_1.updated_by, er_1.updated_on, er_1.created_by, er_1.created_on, er_1.mapping_id, er_1.details
  • Index Cond: (er_1.id = ei.event_result_id)
  • Filter: ((er_1.cid = npe.cid) AND (er_1.cid = ei.cid))
49. 0.091 10.270 ↑ 1.0 1 13

Limit (cost=23.02..23.02 rows=1 width=52) (actual time=0.784..0.790 rows=1 loops=13)

  • Output: ei_1.id, NULL::integer, NULL::integer, ei_1.scheduled_datetime, NULL::text
  • Buffers: shared hit=5465
50. 0.078 10.179 ↑ 2.0 1 13

Sort (cost=23.02..23.02 rows=2 width=52) (actual time=0.783..0.783 rows=1 loops=13)

  • Output: ei_1.id, NULL::integer, NULL::integer, ei_1.scheduled_datetime, NULL::text
  • Sort Key: ei_1.scheduled_datetime DESC, ei_1.id DESC
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=5465
51. 0.078 10.101 ↓ 2.5 5 13

Result (cost=6.32..23.01 rows=2 width=52) (actual time=0.294..0.777 rows=5 loops=13)

  • Output: ei_1.id, NULL::integer, NULL::integer, ei_1.scheduled_datetime, NULL::text
  • One-Time Filter: (npe.cid = 11400)
  • Buffers: shared hit=5465
52. 2.704 10.023 ↓ 2.5 5 13

Hash Left Join (cost=6.32..23.01 rows=2 width=52) (actual time=0.292..0.771 rows=5 loops=13)

  • Output: ei_1.id, NULL::integer, NULL::integer, ei_1.scheduled_datetime, NULL::text
  • Hash Cond: ((ei_1.cid = fa_1.cid) AND (ei_1.data_reference_id = fa_1.file_id) AND (ei_1.lease_id = fa_1.lease_id))
  • Filter: CASE WHEN (ei_1.event_type_id = 309) THEN ((ei_1.lease_id = npe.lease_id) AND (fa_1.id IS NOT NULL)) ELSE (ei_1.lease_interval_id = npe.lease_interval_id) END
  • Rows Removed by Filter: 390
  • Buffers: shared hit=5465
53. 6.591 6.591 ↓ 79.0 395 13

Index Scan using idx_events_cid_etid_pid_event_datetime on public.events ei_1 (cost=0.43..17.01 rows=5 width=32) (actual time=0.005..0.507 rows=395 loops=13)

  • Output: ei_1.id, ei_1.cid, ei_1.property_id, ei_1.property_unit_id, ei_1.unit_space_id, ei_1.event_type_id, ei_1.event_sub_type_id, ei_1.event_result_id, ei_1.default_event_result_id, ei_1.associated_event_id, ei_1.ps_product_id, ei_1.old_stage_id, ei_1.new_stage_id, ei_1.old_status_id, ei_1.new_status_id, ei_1.company_employee_id, ei_1.data_reference_id, ei_1.integration_result_id, ei_1.lease_id, ei_1.lease_interval_id, ei_1.customer_id, ei_1.scheduled_task_id, ei_1.remote_primary_key, ei_1.calendar_event_key, ei_1.scheduled_datetime, ei_1.scheduled_end_datetime, ei_1.event_datetime, ei_1.event_handle, ei_1.title, ei_1.notes, ei_1.details, ei_1.ip_address, ei_1.do_not_export, ei_1.is_resident, ei_1.is_deleted, ei_1.updated_by, ei_1.updated_on, ei_1.created_by, ei_1.created_on, ei_1.organization_contract_id
  • Index Cond: ((ei_1.cid = 11400) AND (ei_1.event_type_id = ANY ('{13,14,25,119,86,309}'::integer[])) AND (ei_1.property_id = npe.property_id))
  • Filter: ((ei_1.event_sub_type_id IS NULL) AND (NOT ei_1.is_deleted))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=5174
54. 0.117 0.728 ↓ 4.3 13 13

Hash (cost=5.84..5.84 rows=3 width=16) (actual time=0.055..0.056 rows=13 loops=13)

  • Output: fa_1.cid, fa_1.lease_id, fa_1.file_id, fa_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=291
55. 0.143 0.611 ↓ 4.3 13 13

Result (cost=0.43..5.84 rows=3 width=16) (actual time=0.012..0.047 rows=13 loops=13)

  • Output: fa_1.cid, fa_1.lease_id, fa_1.file_id, fa_1.id
  • One-Time Filter: (npe.cid = 11400)
  • Buffers: shared hit=291
56. 0.468 0.468 ↓ 4.3 13 13

Index Scan using idx_file_associations_cid_customer_id on public.file_associations fa_1 (cost=0.43..5.84 rows=3 width=16) (actual time=0.010..0.036 rows=13 loops=13)

  • Output: fa_1.id, fa_1.cid, fa_1.file_id, fa_1.property_id, fa_1.document_id, fa_1.applicant_id, fa_1.quote_id, fa_1.application_id, fa_1.customer_id, fa_1.customer_pet_id, fa_1.lease_id, fa_1.ar_transaction_id, fa_1.inspection_response_id, fa_1.maintenance_request_id, fa_1.company_user_report_history_id, fa_1.ap_payee_id, fa_1.ap_payee_location_id, fa_1.ap_header_id, fa_1.ap_payment_id, fa_1.ap_payment_batch_id, fa_1.check_component_type_id, fa_1.bank_account_id, fa_1.gl_header_id, fa_1.gl_reconciliation_id, fa_1.gl_header_schedule_id, fa_1.chore_id, fa_1.vp_document_id, fa_1.company_employee_id, fa_1.company_owner_id, fa_1.system_message_id, fa_1.campaign_id, fa_1.scheduled_email_id, fa_1.scheduled_task_email_id, fa_1.scheduled_charge_id, fa_1.esa_file_id, fa_1.customer_data_verification_id, fa_1.budget_change_order_id, fa_1.subsidy_certification_id, fa_1.subsidy_hap_request_id, fa_1.subsidy_special_claim_id, fa_1.military_mac_period_id, fa_1.ip_address, fa_1.remote_primary_key, fa_1.signature, fa_1.order_num, fa_1.require_sign, fa_1.sign_initiated_on, fa_1.file_signed_on, fa_1.approved_by, fa_1.approved_on, fa_1.deleted_by, fa_1.deleted_on, fa_1.updated_by, fa_1.updated_on, fa_1.created_by, fa_1.created_on, fa_1.violation_id, fa_1.resident_insurance_policy_id, fa_1.owner_id, fa_1.organization_id, fa_1.organization_contract_id
  • Index Cond: ((fa_1.cid = 11400) AND (fa_1.customer_id = npe.customer_id))
  • Filter: ((fa_1.file_signed_on IS NULL) AND (fa_1.deleted_by IS NULL))
  • Rows Removed by Filter: 25
  • Buffers: shared hit=291
57. 0.026 0.156 ↓ 0.0 0 13

Limit (cost=2.66..2.67 rows=1 width=52) (actual time=0.012..0.012 rows=0 loops=13)

  • Output: ei_2.id, NULL::integer, NULL::text, NULL::integer, ei_2.scheduled_datetime
  • Buffers: shared hit=66
58. 0.039 0.130 ↓ 0.0 0 13

Sort (cost=2.66..2.67 rows=1 width=52) (actual time=0.010..0.010 rows=0 loops=13)

  • Output: ei_2.id, NULL::integer, NULL::text, NULL::integer, ei_2.scheduled_datetime
  • Sort Key: ei_2.scheduled_datetime DESC, ei_2.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=66
59. 0.013 0.091 ↓ 0.0 0 13

Result (cost=0.42..2.65 rows=1 width=52) (actual time=0.007..0.007 rows=0 loops=13)

  • Output: ei_2.id, NULL::integer, NULL::text, NULL::integer, ei_2.scheduled_datetime
  • One-Time Filter: (npe.cid = 11400)
  • Buffers: shared hit=66
60. 0.078 0.078 ↓ 0.0 0 13

Index Scan using idx_events_partial_dashboard_leads_applicants on public.events ei_2 (cost=0.42..2.65 rows=1 width=52) (actual time=0.006..0.006 rows=0 loops=13)

  • Output: ei_2.id, ei_2.cid, ei_2.property_id, ei_2.property_unit_id, ei_2.unit_space_id, ei_2.event_type_id, ei_2.event_sub_type_id, ei_2.event_result_id, ei_2.default_event_result_id, ei_2.associated_event_id, ei_2.ps_product_id, ei_2.old_stage_id, ei_2.new_stage_id, ei_2.old_status_id, ei_2.new_status_id, ei_2.company_employee_id, ei_2.data_reference_id, ei_2.integration_result_id, ei_2.lease_id, ei_2.lease_interval_id, ei_2.customer_id, ei_2.scheduled_task_id, ei_2.remote_primary_key, ei_2.calendar_event_key, ei_2.scheduled_datetime, ei_2.scheduled_end_datetime, ei_2.event_datetime, ei_2.event_handle, ei_2.title, ei_2.notes, ei_2.details, ei_2.ip_address, ei_2.do_not_export, ei_2.is_resident, ei_2.is_deleted, ei_2.updated_by, ei_2.updated_on, ei_2.created_by, ei_2.created_on, ei_2.organization_contract_id
  • Index Cond: ((ei_2.cid = 11400) AND (ei_2.lease_interval_id = npe.lease_interval_id))
  • Filter: ((ei_2.scheduled_datetime >= ei.scheduled_datetime) AND (ei_2.event_type_id = 8) AND (ei_2.property_id = npe.property_id))
  • Rows Removed by Filter: 2
  • Buffers: shared hit=66
61. 0.052 0.598 ↑ 1.0 1 13

Limit (cost=3.86..3.86 rows=1 width=24) (actual time=0.043..0.046 rows=1 loops=13)

  • Output: ei_3.id, NULL::integer, NULL::integer, NULL::integer, ei_3.scheduled_datetime
  • Buffers: shared hit=130
62. 0.052 0.546 ↑ 1.0 1 13

Sort (cost=3.86..3.86 rows=1 width=24) (actual time=0.041..0.042 rows=1 loops=13)

  • Output: ei_3.id, NULL::integer, NULL::integer, NULL::integer, ei_3.scheduled_datetime
  • Sort Key: ei_3.scheduled_datetime DESC, ei_3.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=130
63. 0.039 0.494 ↑ 1.0 1 13

Result (cost=0.42..3.85 rows=1 width=24) (actual time=0.024..0.038 rows=1 loops=13)

  • Output: ei_3.id, NULL::integer, NULL::integer, NULL::integer, ei_3.scheduled_datetime
  • One-Time Filter: (npe.cid = 11400)
  • Buffers: shared hit=130
64. 0.455 0.455 ↑ 1.0 1 13

Index Scan using idx_events_cid_lease_interval_id_event_datetime on public.events ei_3 (cost=0.42..3.85 rows=1 width=24) (actual time=0.023..0.035 rows=1 loops=13)

  • Output: ei_3.id, ei_3.cid, ei_3.property_id, ei_3.property_unit_id, ei_3.unit_space_id, ei_3.event_type_id, ei_3.event_sub_type_id, ei_3.event_result_id, ei_3.default_event_result_id, ei_3.associated_event_id, ei_3.ps_product_id, ei_3.old_stage_id, ei_3.new_stage_id, ei_3.old_status_id, ei_3.new_status_id, ei_3.company_employee_id, ei_3.data_reference_id, ei_3.integration_result_id, ei_3.lease_id, ei_3.lease_interval_id, ei_3.customer_id, ei_3.scheduled_task_id, ei_3.remote_primary_key, ei_3.calendar_event_key, ei_3.scheduled_datetime, ei_3.scheduled_end_datetime, ei_3.event_datetime, ei_3.event_handle, ei_3.title, ei_3.notes, ei_3.details, ei_3.ip_address, ei_3.do_not_export, ei_3.is_resident, ei_3.is_deleted, ei_3.updated_by, ei_3.updated_on, ei_3.created_by, ei_3.created_on, ei_3.organization_contract_id
  • Index Cond: ((ei_3.cid = 11400) AND (ei_3.lease_interval_id = npe.lease_interval_id))
  • Filter: ((NOT ei_3.is_deleted) AND (ei_3.event_type_id <> 15) AND CASE WHEN (pp2.id IS NULL) THEN true WHEN ((pp2.id IS NOT NULL) AND (COALESCE(ei_3.ps_product_id, 0) <> 46)) THEN true ELSE NULL::boolean END AND (ei_3.property_id = npe.property_id) AND CASE WHEN (pp1.id IS NULL) THEN true WHEN ((pp1.id IS NOT NULL) AND (pp1.value = '1'::text) AND (COALESCE(ei_3.ps_product_id, 0) <> 28)) THEN true ELSE NULL::boolean END AND (to_char(ei_3.scheduled_datetime, 'YYYY/MM/DD HH24:MI:SS'::text) >= to_char(COALESCE(ei.scheduled_datetime, ca.application_datetime), 'YYYY/MM/DD HH24:MI:SS'::text)) AND (ei_3.event_type_id = ANY ('{78,17,9,15,10,238,18,5,1,33,6,7,4,2,3,16,173,25}'::integer[])))
  • Rows Removed by Filter: 8
  • Buffers: shared hit=130
Planning time : 15.025 ms
Execution time : 19.392 ms