explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mM7E

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

Hash Left Join (cost=46,908.51..327,735.11 rows=12,420 width=434) (actual time=4.954..4.954 rows=0 loops=1)

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

Hash Left Join (cost=23,454.25..304,124.06 rows=12,420 width=351) (actual time=4.953..4.953 rows=0 loops=1)

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

Seq Scan on scheduled_call (cost=0.00..280,513.00 rows=12,420 width=268) (actual time=4.952..4.952 rows=0 loops=1)

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

SubPlan (forSeq Scan)

5. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

10. 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)

11. 0.000 0.000 ↓ 0.0 0

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

12. 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)