explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xC8H

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.028 8,683.798 ↑ 1.0 1 1

Aggregate (cost=227,229.71..227,229.72 rows=1 width=8) (actual time=8,683.798..8,683.798 rows=1 loops=1)

2. 56.907 8,683.770 ↑ 1.6 158 1

Bitmap Heap Scan on a_mail mail0_ (cost=160,777.94..227,229.65 rows=248 width=8) (actual time=8,674.887..8,683.770 rows=158 loops=1)

  • Recheck Cond: (((current_department_)::text = '299900/06/03'::text) AND ((mail_status_)::text = ANY ('{Registered,Returned,Forwarded,Arrived,ForDeliveryList,SendedToDeadLetter,RemovedFromForeign}'::text[])))
  • Filter: ((packet_list_ IS NULL) AND (act_item_ IS NULL) AND (((modify_date_ IS NOT NULL) AND (date(modify_date_) = CURRENT_DATE)) OR ((modify_date_ IS NULL) AND (date(create_date_) = CURRENT_DATE))))
  • Rows Removed by Filter: 10,236
  • Heap Blocks: exact=10,010
3. 310.087 8,626.863 ↓ 0.0 0 1

BitmapAnd (cost=160,777.94..160,777.94 rows=60,149 width=0) (actual time=8,626.863..8,626.863 rows=0 loops=1)

4. 131.364 131.364 ↓ 1.0 524,921 1

Bitmap Index Scan on a_mail_current_department_ (cost=0.00..8,560.73 rows=515,519 width=0) (actual time=131.364..131.364 rows=524,921 loops=1)

  • Index Cond: ((current_department_)::text = '299900/06/03'::text)
5. 8,185.412 8,185.412 ↓ 2.9 29,655,191 1

Bitmap Index Scan on a_mail_mail_status_ (cost=0.00..152,217.17 rows=10,264,340 width=0) (actual time=8,185.412..8,185.412 rows=29,655,191 loops=1)

  • Index Cond: ((mail_status_)::text = ANY ('{Registered,Returned,Forwarded,Arrived,ForDeliveryList,SendedToDeadLetter,RemovedFromForeign}'::text[]))
Planning time : 0.411 ms
Execution time : 8,700.972 ms