explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Torr

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 13.888 ↓ 0.0 0 1

Hash Left Join (cost=46,908.51..607,511.91 rows=15,525 width=434) (actual time=13.888..13.888 rows=0 loops=1)

  • Hash Cond: (scheduled_call.borrower_contact_id = contact_2.id)
2. 0.002 13.887 ↓ 0.0 0 1

Hash Left Join (cost=23,454.25..583,861.66 rows=15,525 width=351) (actual time=13.887..13.887 rows=0 loops=1)

  • Hash Cond: (scheduled_call.staff_contact_id = contact_1.id)
3. 13.828 13.885 ↓ 0.0 0 1

Seq Scan on scheduled_call (cost=0.00..560,211.40 rows=15,525 width=268) (actual time=13.885..13.885 rows=0 loops=1)

  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 3 or hashed SubPlan 4) OR (alternatives: SubPlan 5 or hashed SubPlan 6) OR (alternatives: SubPlan 7 or hashed SubPlan 8))
  • Rows Removed by Filter: 16560
4.          

SubPlan (forSeq Scan)

5. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_contact_phone on contact (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((phone)::text = '+12122122122'::text)
  • Filter: (scheduled_call.staff_contact_id = id)
6. 0.026 0.026 ↑ 1.0 1 1

Index Scan using ix_contact_phone on contact contact_3 (cost=0.42..8.44 rows=1 width=4) (actual time=0.025..0.026 rows=1 loops=1)

  • Index Cond: ((phone)::text = '+12122122122'::text)
7. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_contact_phone on contact contact_4 (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: ((phone)::text = '+12122122122'::text)
  • Filter: (scheduled_call.borrower_contact_id = id)
8. 0.015 0.015 ↑ 1.0 1 1

Index Scan using ix_contact_phone on contact contact_5 (cost=0.42..8.44 rows=1 width=4) (actual time=0.014..0.015 rows=1 loops=1)

  • Index Cond: ((phone)::text = '+12122122122'::text)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using contact_pkey on contact contact_6 (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: (scheduled_call.staff_contact_id = id)
  • Filter: (account_id = 8234832)
10. 0.008 0.008 ↓ 0.0 0 1

Index Scan using ix_contact_account_id on contact contact_7 (cost=0.42..9.02 rows=2 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (account_id = 8234832)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using contact_pkey on contact contact_8 (cost=0.42..8.45 rows=1 width=0) (never executed)

  • Index Cond: (scheduled_call.borrower_contact_id = id)
  • Filter: (account_id = 128435)
12. 0.008 0.008 ↑ 2.0 1 1

Index Scan using ix_contact_account_id on contact contact_9 (cost=0.42..9.02 rows=2 width=4) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (account_id = 128435)
13. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,291.89..15,291.89 rows=652,989 width=83) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Seq Scan on contact contact_1 (cost=0.00..15,291.89 rows=652,989 width=83) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,291.89..15,291.89 rows=652,989 width=83) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Seq Scan on contact contact_2 (cost=0.00..15,291.89 rows=652,989 width=83) (never executed)