explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3HAY : Optimization for: phoneowner; plan #1fno

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 635.263 2,480.608 ↑ 575.5 2 1

Hash Left Join (cost=53.88..313,920.66 rows=1,151 width=1,275) (actual time=4.121..2,480.608 rows=2 loops=1)

  • Hash Cond: (ap.id = po.policy_id)
  • Filter: ((ap.user_id = 3) OR (po.user_id = 3))
  • Rows Removed by Filter: 2085547
  • Planning time: 0.384 ms
  • Execution time: 2480.659 ms
2. 1,844.324 1,844.324 ↓ 1.0 2,085,494 1

Seq Scan on amazon_mobile_policy ap (cost=0.00..288,997.24 rows=1,987,990 width=1,275) (actual time=0.010..1,844.324 rows=2,085,494 loops=1)

  • Filter: (is_policy_complete AND (((status)::text <> 'INACTIVE'::text) OR (status IS NULL)))
  • Rows Removed by Filter: 534045
3. 0.507 1.021 ↓ 1.0 1,774 1

Hash (cost=32.28..32.28 rows=1,728 width=8) (actual time=1.021..1.021 rows=1,774 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 86kB
4. 0.514 0.514 ↓ 1.0 1,774 1

Seq Scan on amazon_mobile_phoneowner po (cost=0.00..32.28 rows=1,728 width=8) (actual time=0.004..0.514 rows=1,774 loops=1)