explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eup9 : Making a NOT IN query faster: SQL 1: (SO: http://stackoverflow.com/q/29555116/1082673)

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

Aggregate (cost=476,413,999.30..476,413,999.31 rows=1 width=13) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Index Scan using log_entries on log_entries (cost=0.42..476,413,960.49 rows=15,524 width=13) (actual rows= loops=)

  • Index Cond: ((created_at >= '2015-04-09 00:00:00'::timestamp without time zone) AND (created_at <= '2015-04-09 23:59:59'::timestamp without time zone))
  • Filter: (NOT (SubPlan 1))
3.          

SubPlan (for Index Scan)

4. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..29,092.59 rows=638,861 width=13) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on log_entries log_entries_1 (cost=0.00..22,778.29 rows=638,861 width=13) (actual rows= loops=)

  • Filter: (created_at < '2015-04-09 00:00:00'::timestamp without time zone)