explain.depesz.com

A tool for finding a real cause for slow queries.

Result: bGJ

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 155.735 14,476.388 ↑ 1.2 4 1

Merge Join (cost=82.52..494,708.51 rows=5 width=3,108) (actual time=11,573.868..14,476.388 rows=4 loops=1)

  • Merge Cond: (applicant.id = aa.applicant_id)
2. 1,138.716 14,320.567 ↑ 1.0 599,961 1

Merge Left Join (cost=45.59..493,159.39 rows=604,845 width=3,108) (actual time=0.118..14,320.567 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = current_address_contact.applicant_id)
3. 1,097.011 12,078.964 ↑ 1.0 599,961 1

Merge Left Join (cost=37.65..410,539.75 rows=602,331 width=3,050) (actual time=0.108..12,078.964 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = secondary_vehicle.applicant_id)
4. 1,452.379 9,978.522 ↑ 1.0 599,961 1

Merge Left Join (cost=31.46..349,738.66 rows=601,124 width=2,976) (actual time=0.096..9,978.522 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = detail.applicant_id)
  • Join Filter: (detail.management_company_id = applicant.management_company_id)
5. 998.874 7,962.095 ↑ 1.0 599,961 1

Merge Left Join (cost=27.54..307,505.64 rows=601,124 width=1,128) (actual time=0.081..7,962.095 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = current_address.applicant_id)
6. 869.608 6,014.121 ↑ 1.0 599,961 1

Merge Left Join (cost=20.86..245,204.60 rows=601,124 width=987) (actual time=0.070..6,014.121 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = previous_address_contact.applicant_id)
7. 895.868 4,306.451 ↑ 1.0 599,961 1

Merge Left Join (cost=12.85..162,812.89 rows=601,124 width=929) (actual time=0.054..4,306.451 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = previous_address.applicant_id)
8. 1,266.874 2,652.705 ↑ 1.0 599,961 1

Merge Left Join (cost=6.21..100,488.46 rows=601,124 width=788) (actual time=0.038..2,652.705 rows=599,961 loops=1)

  • Merge Cond: (applicant.id = primary_vehicle.applicant_id)
9. 661.053 661.053 ↑ 1.0 599,961 1

Index Scan using pk_applicants on applicants applicant (cost=0.00..39,716.03 rows=601,124 width=714) (actual time=0.016..661.053 rows=599,961 loops=1)

10. 724.778 724.778 ↑ 1.0 599,961 1

Index Scan using idx_applicant_vehicles_applicant_id on applicant_vehicles primary_vehicle (cost=0.00..51,769.15 rows=600,038 width=78) (actual time=0.015..724.778 rows=599,961 loops=1)

  • Filter: (primary_vehicle.customer_vehicle_type_id = 1)
11. 757.878 757.878 ↑ 1.0 599,961 1

Index Scan using idx_applicant_addresses_applicant_id on applicant_addresses previous_address (cost=0.00..53,313.86 rows=602,686 width=145) (actual time=0.014..757.878 rows=599,961 loops=1)

  • Filter: (previous_address.address_type_id = 9)
12. 838.062 838.062 ↓ 1.0 599,961 1

Index Scan using idx_applicant_contacts_applicant_id on applicant_contacts previous_address_contact (cost=0.00..73,418.04 rows=598,640 width=62) (actual time=0.014..838.062 rows=599,961 loops=1)

  • Filter: (previous_address_contact.customer_contact_type_id = 2)
13. 949.100 949.100 ↓ 1.0 599,961 1

Index Scan using idx_applicant_addresses_applicant_id on applicant_addresses current_address (cost=0.00..53,313.86 rows=599,561 width=145) (actual time=0.008..949.100 rows=599,961 loops=1)

  • Filter: (current_address.address_type_id = 12)
14. 564.048 564.048 ↑ 1.0 600,715 1

Index Scan using idx_applicant_details_applicant_id on applicant_details detail (cost=0.00..31,711.47 rows=601,879 width=1,856) (actual time=0.011..564.048 rows=600,715 loops=1)

15. 1,003.431 1,003.431 ↑ 1.0 599,961 1

Index Scan using idx_applicant_vehicles_applicant_id on applicant_vehicles secondary_vehicle (cost=0.00..51,769.15 rows=602,331 width=78) (actual time=0.010..1,003.431 rows=599,961 loops=1)

  • Filter: (secondary_vehicle.customer_vehicle_type_id = 2)
16. 1,102.887 1,102.887 ↑ 1.0 599,961 1

Index Scan using idx_applicant_contacts_applicant_id on applicant_contacts current_address_contact (cost=0.00..73,418.04 rows=603,633 width=62) (actual time=0.009..1,102.887 rows=599,961 loops=1)

  • Filter: (current_address_contact.customer_contact_type_id = 1)
17. 0.025 0.086 ↑ 1.2 4 1

Sort (cost=36.93..36.94 rows=5 width=4) (actual time=0.081..0.086 rows=4 loops=1)

  • Sort Key: aa.applicant_id
  • Sort Method: quicksort Memory: 25kB
18. 0.016 0.061 ↑ 1.2 4 1

Bitmap Heap Scan on applicant_applications aa (cost=17.10..36.87 rows=5 width=4) (actual time=0.053..0.061 rows=4 loops=1)

  • Recheck Cond: (application_id = ANY ('{1254504,1254503,1125307,1254391}'::integer[]))
  • Filter: (lease_customer_type_id = 1)
19. 0.045 0.045 ↑ 1.2 4 1

Bitmap Index Scan on idx_applicant_applications_application_id (cost=0.00..17.10 rows=5 width=0) (actual time=0.045..0.045 rows=4 loops=1)

  • Index Cond: (application_id = ANY ('{1254504,1254503,1125307,1254391}'::integer[]))