explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FQ3zY

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 515,289.553 ↑ 1.0 1 1

Aggregate (cost=389,699.73..389,699.74 rows=1 width=12) (actual time=515,289.552..515,289.553 rows=1 loops=1)

2. 0.001 515,289.550 ↓ 0.0 0 1

Subquery Scan on t (cost=389,699.68..389,699.73 rows=1 width=4) (actual time=515,289.550..515,289.550 rows=0 loops=1)

  • Filter: CASE WHEN ((t.is_allow_lease_progression IS NULL) OR (t.app_id IS NULL)) THEN (t.rank1 = 1) ELSE (t.rank1 IS NOT NULL) END
3. 0.000 515,289.549 ↓ 0.0 0 1

Unique (cost=389,699.68..389,699.72 rows=1 width=186) (actual time=515,289.549..515,289.549 rows=0 loops=1)

4. 0.022 515,289.549 ↓ 0.0 0 1

Sort (cost=389,699.68..389,699.69 rows=1 width=186) (actual time=515,289.549..515,289.549 rows=0 loops=1)

  • Sort Key: (CASE WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text)) <> ''::text) AND (ca.lease_start_date <= (CURRENT_DATE + ((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text))::integer))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text)) <> ''::text) AND (ca.lease_interval_type_id = ANY (((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text))::integer[]))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_document_signed_since'::text)) <> ''::text) AND (CURRENT_DATE >= ((f.file_signed_on)::date + ((dp.approvals_esign_docs ->> 'urgent_document_signed_since'::text))::integer))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_document_signed_since'::text)) <> ''::text) AND (CURRENT_DATE >= ((f.file_signed_on)::date + ((dp.approvals_esign_docs ->> 'important_document_signed_since'::text))::integer))) THEN 2 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text)) <> ''::text) AND (ca.lease_interval_type_id = ANY (((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text))::integer[]))) THEN 2 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text)) <> ''::text) AND (ca.lease_start_date <= (CURRENT_DATE + ((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text))::integer))) THEN 2 ELSE 1 END), ca.id, f.lease_id, ap.lease_signed_on, f.applicant_id, f.application_id, f.is_allow_lease_progression, f.id, p.property_name, p.id, (rank() OVER (?))
  • Sort Method: quicksort Memory: 25kB
5. 0.003 515,289.527 ↓ 0.0 0 1

WindowAgg (cost=389,699.65..389,699.67 rows=1 width=186) (actual time=515,289.527..515,289.527 rows=0 loops=1)

6. 0.009 515,289.524 ↓ 0.0 0 1

Sort (cost=389,699.65..389,699.65 rows=1 width=178) (actual time=515,289.524..515,289.524 rows=0 loops=1)

  • Sort Key: fa_1.file_id, lc.customer_type_id, lc.id
  • Sort Method: quicksort Memory: 25kB
7. 0.000 515,289.515 ↓ 0.0 0 1

Nested Loop (cost=389,652.67..389,699.64 rows=1 width=178) (actual time=515,289.515..515,289.515 rows=0 loops=1)

8. 0.001 515,289.515 ↓ 0.0 0 1

Nested Loop (cost=389,652.24..389,699.18 rows=1 width=186) (actual time=515,289.515..515,289.515 rows=0 loops=1)

9. 0.000 515,289.514 ↓ 0.0 0 1

Nested Loop (cost=389,651.81..389,692.83 rows=14 width=178) (actual time=515,289.514..515,289.514 rows=0 loops=1)

10. 0.001 515,289.514 ↓ 0.0 0 1

Group (cost=389,651.25..389,651.65 rows=2 width=290) (actual time=515,289.514..515,289.514 rows=0 loops=1)

  • Group Key: ((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text)), ((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text)), ((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text)), ((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text)), p.id, p.property_name, ca.id, (CASE WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text)) <> ''::text) AND (ca.lease_start_date <= (CURRENT_DATE + ((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text))::integer))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text)) <> ''::text) AND (ca.lease_interval_type_id = ANY (((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text))::integer[]))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_document_signed_since'::text)) <> ''::text) AND (CURRENT_DATE >= ((f.file_signed_on)::date + ((dp.approvals_esign_docs ->> 'urgent_document_signed_since'::text))::integer))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_document_signed_since'::text)) <> ''::text) AND (CURRENT_DATE >= ((f.file_signed_on)::date + ((dp.approvals_esign_docs ->> 'important_document_signed_since'::text))::integer))) THEN 2 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text)) <> ''::text) AND (ca.lease_interval_type_id = ANY (((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text))::integer[]))) THEN 2 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text)) <> ''::text) AND (ca.lease_start_date <= (CURRENT_DATE + ((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text))::integer))) THEN 2 ELSE 1 END), f.lease_id, f.cid, f.id, ap.lease_signed_on, f.application_id, f.applicant_id, f.is_allow_lease_progression
11. 0.021 515,289.513 ↓ 0.0 0 1

Sort (cost=389,651.25..389,651.25 rows=2 width=290) (actual time=515,289.513..515,289.513 rows=0 loops=1)

  • Sort Key: ((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text)), ((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text)), ((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text)), ((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text)), p.id, p.property_name, ca.id, (CASE WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text)) <> ''::text) AND (ca.lease_start_date <= (CURRENT_DATE + ((dp.approvals_esign_docs ->> 'urgent_move_in_date_within'::text))::integer))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text)) <> ''::text) AND (ca.lease_interval_type_id = ANY (((dp.approvals_esign_docs ->> 'urgent_lease_type_ids'::text))::integer[]))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'urgent_document_signed_since'::text)) <> ''::text) AND (CURRENT_DATE >= ((f.file_signed_on)::date + ((dp.approvals_esign_docs ->> 'urgent_document_signed_since'::text))::integer))) THEN 3 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_document_signed_since'::text)) <> ''::text) AND (CURRENT_DATE >= ((f.file_signed_on)::date + ((dp.approvals_esign_docs ->> 'important_document_signed_since'::text))::integer))) THEN 2 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text)) <> ''::text) AND (ca.lease_interval_type_id = ANY (((dp.approvals_esign_docs ->> 'important_lease_type_ids'::text))::integer[]))) THEN 2 WHEN ((btrim((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text)) <> ''::text) AND (ca.lease_start_date <= (CURRENT_DATE + ((dp.approvals_esign_docs ->> 'important_move_in_date_within'::text))::integer))) THEN 2 ELSE 1 END), f.lease_id, f.id, ap.lease_signed_on, f.application_id, f.applicant_id, f.is_allow_lease_progression
  • Sort Method: quicksort Memory: 25kB
12. 0.000 515,289.492 ↓ 0.0 0 1

Nested Loop Left Join (cost=389,614.29..389,651.24 rows=2 width=290) (actual time=515,289.492..515,289.492 rows=0 loops=1)

  • Join Filter: (dp.cid = f.cid)
13. 0.002 515,289.492 ↓ 0.0 0 1

Merge Right Join (cost=389,614.29..389,649.86 rows=2 width=174) (actual time=515,289.492..515,289.492 rows=0 loops=1)

  • Merge Cond: (f1.file_id = f.id)
  • Filter: (((f1.file_id IS NOT NULL) AND (0 < (count(f1.id)))) OR (f.document_id IS NULL))
14. 0.009 515,289.462 ↑ 1,182.0 1 1

GroupAggregate (cost=389,521.27..389,541.96 rows=1,182 width=12) (actual time=515,289.462..515,289.462 rows=1 loops=1)

  • Group Key: f1.file_id
15. 194.886 515,289.453 ↑ 591.0 2 1

Sort (cost=389,521.27..389,524.23 rows=1,182 width=8) (actual time=515,289.453..515,289.453 rows=2 loops=1)

  • Sort Key: f1.file_id
  • Sort Method: quicksort Memory: 28,868kB
16. 912.541 515,094.567 ↓ 299.2 353,688 1

Nested Loop Semi Join (cost=1,560.24..389,460.95 rows=1,182 width=8) (actual time=1,006.131..515,094.567 rows=353,688 loops=1)

17. 3,438.519 33,373.874 ↓ 106.9 5,463,729 1

Hash Left Join (cost=1,559.67..358,319.99 rows=51,088 width=12) (actual time=102.743..33,373.874 rows=5,463,729 loops=1)

  • Hash Cond: ((f1.cid = da.cid) AND (f1.document_id = da.document_id) AND (f1.document_addenda_id = da.id))
  • Filter: CASE WHEN ((cu.is_administrator = 0) AND (da.countersign_company_group_ids IS NOT NULL)) THEN ((SubPlan 8) && da.countersign_company_group_ids) WHEN ((cu.is_administrator = 1) OR (da.countersign_company_group_ids IS NULL)) THEN true ELSE NULL::boolean END
18. 1,298.757 29,832.906 ↓ 53.5 5,463,729 1

Nested Loop (cost=1.12..355,956.81 rows=102,176 width=32) (actual time=0.097..29,832.906 rows=5,463,729 loops=1)

19. 0.003 0.061 ↑ 1.0 1 1

Nested Loop (cost=0.56..5.01 rows=1 width=20) (actual time=0.058..0.061 rows=1 loops=1)

20. 0.029 0.029 ↑ 1.0 1 1

Index Scan using idx_file_types_cid_system_code on file_types ft1 (cost=0.27..2.49 rows=1 width=8) (actual time=0.028..0.029 rows=1 loops=1)

  • Index Cond: ((cid = 3,395) AND ((system_code)::text = 'LA'::text))
21. 0.029 0.029 ↑ 1.0 1 1

Index Scan using idx_company_users_id on company_users cu (cost=0.29..2.51 rows=1 width=12) (actual time=0.027..0.029 rows=1 loops=1)

  • Index Cond: (id = 100,595)
  • Filter: ((cid = 3,395) AND (company_user_type_id = 2))
22. 28,534.088 28,534.088 ↓ 6.5 5,463,729 1

Index Scan using idx_files_cid_file_type_id on files f1 (cost=0.56..347,488.58 rows=846,322 width=24) (actual time=0.037..28,534.088 rows=5,463,729 loops=1)

  • Index Cond: ((cid = 3,395) AND (file_type_id = ft1.id))
23. 7.687 102.449 ↑ 1.0 31,109 1

Hash (cost=1,014.14..1,014.14 rows=31,109 width=44) (actual time=102.449..102.449 rows=31,109 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,593kB
24. 94.762 94.762 ↑ 1.0 31,109 1

Seq Scan on document_addendas da (cost=0.00..1,014.14 rows=31,109 width=44) (actual time=4.778..94.762 rows=31,109 loops=1)

  • Filter: (cid = 3,395)
  • Rows Removed by Filter: 22
25.          

SubPlan (for Hash Left Join)

26. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_company_user_groups_company_user_id on company_user_groups (cost=0.29..3.18 rows=3 width=4) (never executed)

  • Index Cond: (company_user_id = cu.id)
  • Filter: (cid = cu.cid)
27. 480,808.152 480,808.152 ↓ 0.0 0 5,463,729

Index Scan using idx_file_associations_cid_file_id on file_associations fa1 (cost=0.56..1.30 rows=17 width=8) (actual time=0.088..0.088 rows=0 loops=5,463,729)

  • Index Cond: ((cid = 3,395) AND (file_id = f1.id))
  • Filter: ((deleted_by IS NULL) AND (deleted_on IS NULL) AND (approved_on IS NULL) AND (approved_by IS NULL))
  • Rows Removed by Filter: 2
28. 0.004 0.028 ↓ 0.0 0 1

Materialize (cost=93.02..93.03 rows=1 width=178) (actual time=0.028..0.028 rows=0 loops=1)

29. 0.010 0.024 ↓ 0.0 0 1

Sort (cost=93.02..93.02 rows=1 width=178) (actual time=0.024..0.024 rows=0 loops=1)

  • Sort Key: f.id
  • Sort Method: quicksort Memory: 25kB
30. 0.000 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.14..93.01 rows=1 width=178) (actual time=0.014..0.014 rows=0 loops=1)

  • Filter: ((CASE WHEN (f.is_resident_verify = 1) THEN CASE WHEN (sar.id IS NOT NULL) THEN ((sar.request_status_type_id = 2) AND CASE WHEN (sar.screening_decision_type_id IS NOT NULL) THEN ((sar.screening_decision_type_id <> 3) AND CASE WHEN ((sar.screening_decision_type_id = 2) AND (alternatives: SubPlan 3 or hashed SubPlan 4)) THEN ((ap.lease_signed_on IS NOT NULL) AND (ap.lease_signature IS NOT NULL) AND (ap.lease_ip_address IS NOT NULL)) ELSE true END) ELSE NULL::boolean END) WHEN (sar.id IS NULL) THEN (sar.id IS NULL) ELSE NULL::boolean END ELSE true END AND (((ca.lease_interval_type_id = 1) AND ((SubPlan 5) IS NOT NULL) AND (pp.id IS NOT NULL)) OR (ca.lease_interval_type_id = ANY ('{3,4,5}'::integer[])) OR (pp.id IS NULL)) AND (f.applicant_id <> ALL ('{17731377,17736429,17741395,17756234,17762399,17764600,17764729,17791487,17794074,17811731,17825707,17842401,17848771,17854014,17856304,17871083,17873160,17886116,17886594,17888890,17893816,17899631,17909879,17916356,17923575,17928942,17938111,17943022,17945391,17947958,17959815,17965086,17965758,17968494,17969365,17969851,17972292,17982979,17983309,17985536,17985614,17994152,17994446,17996273}'::integer[])) AND (NOT (alternatives: SubPlan 6 or hashed SubPlan 7)) AND (ca.application_stage_id = 4) AND CASE WHEN (f.is_allow_lease_progression IS NULL) THEN (ca.application_status_id = 3) ELSE ((ca.application_status_id = ANY ('{2,3}'::integer[])) AND (ap.lease_signed_on IS NOT NULL)) END) OR ((ca.id IS NULL) AND (f.file_signed_on IS NOT NULL) AND ((cl.lease_status_type_id = 3) OR (cl.lease_status_type_id = 4))))
31. 0.001 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.72..78.69 rows=1 width=254) (actual time=0.014..0.014 rows=0 loops=1)

  • Join Filter: (f.cid = sar.cid)
32. 0.000 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.29..78.23 rows=1 width=234) (actual time=0.013..0.013 rows=0 loops=1)

33. 0.000 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..75.57 rows=1 width=198) (actual time=0.013..0.013 rows=0 loops=1)

  • Filter: ((ca.lease_interval_type_id IS NOT NULL) OR ((f.application_id IS NULL) AND (alternatives: SubPlan 1 or hashed SubPlan 2)))
34. 0.001 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.43..23.66 rows=1 width=170) (actual time=0.012..0.013 rows=0 loops=1)

  • Join Filter: (f.property_id = p.id)
35. 0.000 0.012 ↓ 0.0 0 1

Nested Loop (cost=0.43..13.15 rows=1 width=48) (actual time=0.012..0.012 rows=0 loops=1)

36. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on f (cost=0.00..10.50 rows=1 width=44) (actual time=0.012..0.012 rows=0 loops=1)

  • Filter: (cid = 3,395)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_cached_leases on cached_leases cl (cost=0.43..2.65 rows=1 width=12) (never executed)

  • Index Cond: ((cid = 3,395) AND (id = f.lease_id))
38. 0.000 0.000 ↓ 0.0 0

Seq Scan on properties p (cost=0.00..10.50 rows=1 width=126) (never executed)

  • Filter: (cid = 3,395)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_cached_applications_id on cached_applications ca (cost=0.43..2.65 rows=1 width=28) (never executed)

  • Index Cond: (id = f.application_id)
  • Filter: ((cancelled_on IS NULL) AND (cid = 3,395) AND (cid = f.cid))
40.          

SubPlan (for Nested Loop Left Join)

41. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=3.07..49.25 rows=1 width=0) (never executed)

  • Hash Cond: (cf.file_type_id = ft.id)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_files_file_id on files cf (cost=0.56..46.52 rows=86 width=8) (never executed)

  • Index Cond: ((cid = 3,395) AND (file_id = f.id))
43. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.49..2.49 rows=1 width=8) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_file_types_cid_system_code on file_types ft (cost=0.27..2.49 rows=1 width=8) (never executed)

  • Index Cond: ((cid = 3,395) AND ((system_code)::text = 'SIGNED'::text))
45. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..355,954.29 rows=102,176 width=4) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_file_types_cid_system_code on file_types ft_1 (cost=0.27..2.49 rows=1 width=8) (never executed)

  • Index Cond: ((cid = 3,395) AND ((system_code)::text = 'SIGNED'::text))
47. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_files_cid_file_type_id on files cf_1 (cost=0.56..347,488.58 rows=846,322 width=12) (never executed)

  • Index Cond: ((cid = 3,395) AND (file_type_id = ft_1.id))
48. 0.000 0.000 ↓ 0.0 0

Index Scan using uk_applicant_applications_cid_applicant_id_application_id on applicant_applications ap (cost=0.43..2.66 rows=1 width=48) (never executed)

  • Index Cond: ((cid = f.cid) AND (cid = 3,395) AND (applicant_id = f.applicant_id) AND (application_id = f.application_id))
  • Filter: (lease_signed_on IS NOT NULL)
49. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_screening_application_requests_application_id on screening_application_requests sar (cost=0.42..0.45 rows=1 width=20) (never executed)

  • Index Cond: (ca.id = application_id)
  • Filter: (cid = 3,395)
50. 0.000 0.000 ↓ 0.0 0

Index Scan using uk_property_preferences_cid_property_id_key on property_preferences pp (cost=0.42..2.64 rows=1 width=12) (never executed)

  • Index Cond: ((cid = f.cid) AND (cid = 3,395) AND (property_id = f.property_id) AND ((key)::text = 'REQUIRE_RENTERS_INSURANCE_FOR_LEASE_APPROVAL'::text))
  • Filter: (value IS NOT NULL)
51.          

SubPlan (for Nested Loop Left Join)

52. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_screening_application_condition_sets_application_id on screening_application_condition_sets sacs (cost=0.29..2.51 rows=1 width=0) (never executed)

  • Index Cond: (application_id = sar.application_id)
  • Filter: ((satisfied_by IS NULL) AND (satisfied_on IS NULL) AND (cid = sar.cid) AND (is_active = 1))
53. 0.000 0.000 ↓ 0.0 0

Seq Scan on screening_application_condition_sets sacs_1 (cost=0.00..1,110.89 rows=1,688 width=8) (never executed)

  • Filter: ((satisfied_by IS NULL) AND (satisfied_on IS NULL) AND (is_active = 1))
54. 0.000 0.000 ↓ 0.0 0

Limit (cost=5.90..5.91 rows=1 width=12) (never executed)

55. 0.000 0.000 ↓ 0.0 0

Sort (cost=5.90..5.91 rows=1 width=12) (never executed)

  • Sort Key: sub_rip.id DESC
56. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..5.89 rows=1 width=12) (never executed)

57. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_insurance_policy_customers_lease_id on insurance_policy_customers ipc (cost=0.42..3.25 rows=1 width=8) (never executed)

  • Index Cond: (ca.lease_id = lease_id)
  • Filter: ((cid IS NOT NULL) AND (cid = f.cid) AND (f.application_id = application_id))
58. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_resident_insurance_policies_id on resident_insurance_policies sub_rip (cost=0.42..2.65 rows=1 width=16) (never executed)

  • Index Cond: (id = ipc.resident_insurance_policy_id)
  • Filter: ((cid = f.cid) AND (insurance_policy_status_type_id = ANY ('{2,3,8}'::integer[])))
59. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_applicant_applications_cid_application_id on applicant_applications aa (cost=0.43..3.16 rows=1 width=0) (never executed)

  • Index Cond: ((cid = ca.cid) AND (application_id = ca.id))
  • Filter: ((deleted_on IS NOT NULL) AND (customer_type_id = 1))
60. 0.000 0.000 ↓ 0.0 0

Gather (cost=1,000.00..124,290.25 rows=94,889 width=8) (never executed)

  • Workers Planned: 2
  • Workers Launched: 0
61. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on applicant_applications aa_1 (cost=0.00..113,801.35 rows=39,537 width=8) (never executed)

  • Filter: ((deleted_on IS NOT NULL) AND (customer_type_id = 1))
62. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.03 rows=1 width=36) (never executed)

63. 0.000 0.000 ↓ 0.0 0

Seq Scan on dashboard_priorities dp (cost=0.00..1.02 rows=1 width=36) (never executed)

  • Filter: (cid = 3,395)
64. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_file_associations_cid_file_id on file_associations fa_1 (cost=0.56..20.51 rows=7 width=24) (never executed)

  • Index Cond: ((cid = 3,395) AND (file_id = f.id))
  • Filter: (((ca.id = application_id) AND (f.applicant_id = applicant_id)) OR (application_id IS NULL))
65. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_lease_customers_cid_lease_id_customer_id_lease_status_type_ on lease_customers lc (cost=0.43..0.45 rows=1 width=20) (never executed)

  • Index Cond: ((cid = 3,395) AND (lease_id = fa_1.lease_id) AND (customer_id = fa_1.customer_id))
66. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customers_id on customers c (cost=0.43..0.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fa_1.customer_id)
  • Filter: (cid = 3,395)
Planning time : 11.990 ms
Execution time : 515,293.595 ms