explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eo6U : Optimization for: plan #vGYd

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 861.157 23,384.710 ↑ 4.2 3,437,096 1

Hash Anti Join (cost=10.90..2,453,809.74 rows=14,551,750 width=88) (actual time=1.498..23,384.710 rows=3,437,096 loops=1)

  • Output: users.user_id, users.customer_id, users.email_address, users.first_name, users.country_code, users.subs_status, users.subs_type, users.mbw, users.email_confirmed, users.gender, users.frequency, users.discount, users.totalsum, users.max_open_date_camp
  • Hash Cond: ((users.email_address)::text = (blacklist.email)::text)
  • Buffers: shared read=584,455
  • I/O Timings: read=4,516.792
2. 22,523.549 22,523.549 ↑ 4.2 3,437,096 1

Seq Scan on dm.dm_users users (cost=0.00..2,270,082.88 rows=14,551,783 width=88) (actual time=1.463..22,523.549 rows=3,437,096 loops=1)

  • Output: users.id, users.customer_id, users.email_confirmed, users.subs_type, users.email_address, users.first_name, users.country_code, users.mbw, users.date_of_birth, users.gender, users.last_newsl_subscr_chg_date, users.newsl_registration_date, users.orders_cum, users.frequency, users.telephone, users.sms_status, users.totalsum, users.discount, users.rec_simple_sku2, users.max_open_date_camp, users.user_id, users.subs_status, users.last_order_date, users.first_order_date, users.max_open_date_trans, users.max_click_date_camp
  • Filter: ((users.subs_status = 1) AND ((date_part('day'::text, ((CURRENT_DATE)::timestamp without time zone - users.max_open_date_camp)) < '180'::double precision) OR (date_part('day'::text, ((CURRENT_DATE)::timestamp without time zone - users.max_open_date_trans)) < '180'::double precision) OR (date_part('day'::text, ((CURRENT_DATE)::timestamp without time zone - users.newsl_registration_date)) < '180'::double precision) OR (date_part('day'::text, ((CURRENT_DATE)::timestamp without time zone - users.last_newsl_subscr_chg_date)) < '180'::double precision)))
  • Rows Removed by Filter: 23,536,032
  • Buffers: shared read=584,455
  • I/O Timings: read=4,516.792
3. 0.001 0.004 ↓ 0.0 0 1

Hash (cost=10.40..10.40 rows=40 width=516) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: blacklist.email
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
4. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on django.dm_blacklist blacklist (cost=0.00..10.40 rows=40 width=516) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: blacklist.email