explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mbaR

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 261.981 ↑ 1.0 1 1

Limit (cost=0.86..6.20 rows=1 width=36) (actual time=261.981..261.981 rows=1 loops=1)

2. 10.873 261.980 ↑ 1,000,000.0 1 1

Nested Loop (cost=0.86..5,343,066.52 rows=1,000,000 width=36) (actual time=261.980..261.980 rows=1 loops=1)

3. 150.869 150.869 ↑ 99.8 100,238 1

Index Scan Backward using people_age_idx on people (cost=0.43..514,360.60 rows=10,000,054 width=8) (actual time=0.021..150.869 rows=100,238 loops=1)

4. 100.238 100.238 ↓ 0.0 0 100,238

Index Scan using pets_owner_id_idx on pets (cost=0.42..0.46 rows=2 width=36) (actual time=0.001..0.001 rows=0 loops=100,238)

  • Index Cond: (owner_id = people.id)