explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s1YQ : Optimization for: Optimization for: Optimization for: plan #vGYd; plan #eo6U; plan #olNl

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 31.988 688.752 ↑ 4.8 119,183 1

Hash Anti Join (cost=12.75..94,631.22 rows=569,105 width=85) (actual time=0.538..688.752 rows=119,183 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 hit=1699 read=23216
2. 656.525 656.525 ↑ 4.8 119,188 1

Seq Scan on public.dm_users users (cost=0.00..87,428.56 rows=569,325 width=85) (actual time=0.261..656.525 rows=119,188 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: 880812
  • Buffers: shared hit=1695 read=23216
3. 0.087 0.239 ↑ 1.0 389 1

Hash (cost=7.89..7.89 rows=389 width=19) (actual time=0.239..0.239 rows=389 loops=1)

  • Output: blacklist.email
  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
  • Buffers: shared hit=4
4. 0.152 0.152 ↑ 1.0 389 1

Seq Scan on public.dm_blacklist blacklist (cost=0.00..7.89 rows=389 width=19) (actual time=0.027..0.152 rows=389 loops=1)

  • Output: blacklist.email
  • Buffers: shared hit=4
Planning time : 1.094 ms
Execution time : 696.496 ms