explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZGl : Optimization for: plan #PnPx

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 786.805 4,364.933 ↓ 4.5 6,389 1

Nested Loop (cost=0.56..736,606.23 rows=1,429 width=142) (actual time=166.395..4,364.933 rows=6,389 loops=1)

  • Join Filter: ((t1.mail_type2_)::text = "*VALUES*".column1)
  • Rows Removed by Join Filter: 3704619
2. 3,578.128 3,578.128 ↓ 96.2 463,876 1

Index Scan using a_mail_mail_status_ on a_mail t1 (cost=0.56..734,512.61 rows=4,823 width=43) (actual time=2.098..3,578.128 rows=463,876 loops=1)

  • Index Cond: ((mail_status_)::text = 'Delivered'::text)
  • Filter: ((date_trunc('day'::text, modify_date_) >= (CURRENT_DATE - 30)) AND (date_trunc('day'::text, modify_date_) <= (CURRENT_DATE - 1)))
  • Rows Removed by Filter: 482214
3. 0.000 0.000 ↑ 1.0 8 463,876

Materialize (cost=0.00..0.14 rows=8 width=32) (actual time=0.000..0.000 rows=8 loops=463,876)

4. 0.007 0.007 ↑ 1.0 8 1

Values Scan on "*VALUES*" (cost=0.00..0.10 rows=8 width=32) (actual time=0.005..0.007 rows=8 loops=1)

Planning time : 1.430 ms
Execution time : 4,365.441 ms