explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ynS4

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Seq Scan on people pe (cost=0.00..34,787,205.64 rows=1,285,530 width=140) (actual rows= loops=)

  • Filter: (deleted_at IS NULL)
2.          

SubPlan (for Seq Scan)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=16.90..16.91 rows=1 width=32) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..16.90 rows=1 width=13) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Scan using index_phones_people_on_person_id_and_deleted_at on phones_people php (cost=0.43..8.45 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (person_id = pe.id)
6. 0.000 0.000 ↓ 0.0

Index Scan using index_phones_on_id_and_deleted_at on phones ph (cost=0.42..8.44 rows=1 width=21) (actual rows= loops=)

  • Index Cond: (id = php.phone_id)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.31..10.11 rows=1 width=39) (actual rows= loops=)

  • Hash Cond: (pc.id = ppc.people_category_id)
8. 0.000 0.000 ↓ 0.0

Seq Scan on people_categories pc (cost=0.00..1.57 rows=57 width=47) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=1 width=8) (actual rows= loops=)

  • -> Index Only Scan using per_peo_cat_idx on people_people_categories ppc (cost=0.29..8.30 rows=1 width=8)" Index Cond: (person_id = pe.id)