explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rRb : Audience 1

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.086 10.223 ↓ 13.5 54 1

Hash Join (cost=87.95..105.88 rows=4 width=13) (actual time=9.930..10.223 rows=54 loops=1)

  • Hash Cond: ((c.phone)::text = (pre.phone)::text)
  • Join Filter: ((c.last_notified_released < pre."time") OR (c.last_notified_released IS NULL))
2. 0.246 0.246 ↑ 1.0 351 1

Seq Scan on contestants c (cost=0.00..17.00 rows=352 width=21) (actual time=0.012..0.246 rows=351 loops=1)

  • Filter: (active AND (NOT blacklist))
  • Rows Removed by Filter: 649
3. 0.051 9.891 ↓ 14.1 141 1

Hash (cost=87.83..87.83 rows=10 width=21) (actual time=9.891..9.891 rows=141 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
4. 0.275 9.840 ↓ 14.1 141 1

Subquery Scan on pre (cost=67.83..87.83 rows=10 width=21) (actual time=9.194..9.840 rows=141 loops=1)

  • Filter: (((pre.event_code)::text = 'MAXED'::text) OR ((pre.event_code)::text = 'SOONER'::text))
  • Rows Removed by Filter: 859
5. 0.290 9.565 ↑ 1.0 1,000 1

Unique (cost=67.83..72.83 rows=1,000 width=26) (actual time=9.179..9.565 rows=1,000 loops=1)

6. 9.003 9.275 ↑ 1.0 1,000 1

Sort (cost=67.83..70.33 rows=1,000 width=26) (actual time=9.176..9.275 rows=1,000 loops=1)

  • Sort Key: event_attempts.phone, event_attempts."time" DESC
  • Sort Method: quicksort Memory: 103kB
7. 0.272 0.272 ↑ 1.0 1,000 1

Seq Scan on event_attempts (cost=0.00..18.00 rows=1,000 width=26) (actual time=0.007..0.272 rows=1,000 loops=1)

Planning time : 0.329 ms
Execution time : 10.279 ms