explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nunl : Optimization for: Optimization for: plan #vy4f; plan #3QxY

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.045 7,874.320 ↑ 1.0 1 1

Aggregate (cost=226,978.04..226,978.05 rows=1 width=8) (actual time=7,874.320..7,874.320 rows=1 loops=1)

  • Buffers: shared hit=273,355
2. 58.099 7,874.275 ↓ 1.3 316 1

Bitmap Heap Scan on a_mail mail0_ (cost=162,097.01..226,977.98 rows=243 width=8) (actual time=7,833.786..7,874.275 rows=316 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,148
  • Heap Blocks: exact=10,204
  • Buffers: shared hit=273,355
3. 258.867 7,816.176 ↓ 0.0 0 1

BitmapAnd (cost=162,097.01..162,097.01 rows=58,721 width=0) (actual time=7,816.176..7,816.176 rows=0 loops=1)

  • Buffers: shared hit=263,151
4. 144.548 144.548 ↓ 1.1 526,117 1

Bitmap Index Scan on a_mail_current_department_ (cost=0.00..8,264.83 rows=497,918 width=0) (actual time=144.547..144.548 rows=526,117 loops=1)

  • Index Cond: ((current_department_)::text = '299900/06/03'::text)
  • Buffers: shared hit=4,293
5. 7,412.761 7,412.761 ↓ 2.9 30,079,109 1

Bitmap Index Scan on a_mail_mail_status_ (cost=0.00..153,832.15 rows=10,380,865 width=0) (actual time=7,412.761..7,412.761 rows=30,079,109 loops=1)

  • Index Cond: ((mail_status_)::text = ANY ('{Registered,Returned,Forwarded,Arrived,ForDeliveryList,SendedToDeadLetter,RemovedFromForeign}'::text[]))
  • Buffers: shared hit=258,858
Planning time : 0.975 ms
Execution time : 7,891.454 ms