explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0yd

Settings
# exclusive inclusive rows x rows loops node
1. 2,005.121 12,290.665 ↓ 1.0 1,285,693 1

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

  • Filter: (deleted_at IS NULL)
2.          

SubPlan (for Seq Scan)

3. 0.000 7,714.158 ↑ 1.0 1 1,285,693

Aggregate (cost=16.90..16.91 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=1,285,693)

4. 858.751 7,714.158 ↑ 1.0 1 1,285,693

Nested Loop (cost=0.85..16.90 rows=1 width=13) (actual time=0.005..0.006 rows=1 loops=1,285,693)

5. 3,857.079 3,857.079 ↑ 1.0 1 1,285,693

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 time=0.003..0.003 rows=1 loops=1,285,693)

  • Index Cond: (person_id = pe.id)
6. 2,998.328 2,998.328 ↑ 1.0 1 1,499,164

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

  • Index Cond: (id = php.phone_id)
7. 1,244.953 2,571.386 ↓ 0.0 0 1,285,693

Hash Join (cost=8.31..10.11 rows=1 width=39) (actual time=0.002..0.002 rows=0 loops=1,285,693)

  • Hash Cond: (pc.id = ppc.people_category_id)
8. 40.740 40.740 ↑ 1.0 57 13,580

Seq Scan on people_categories pc (cost=0.00..1.57 rows=57 width=47) (actual time=0.001..0.003 rows=57 loops=13,580)

9. 0.000 1,285.693 ↓ 0.0 0 1,285,693

Hash (cost=8.30..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,285,693)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
10. 1,285.693 1,285.693 ↓ 0.0 0 1,285,693

Index Only Scan using per_peo_cat_idx on people_people_categories ppc (cost=0.29..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,285,693)

  • Index Cond: (person_id = pe.id)
  • Heap Fetches: 15417