explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.043 7,957.856 ↑ 1.0 1 1

Aggregate (cost=226,888.83..226,888.84 rows=1 width=8) (actual time=7,957.855..7,957.856 rows=1 loops=1)

  • Buffers: shared hit=274,145
2. 55.927 7,957.813 ↓ 1.3 311 1

Bitmap Heap Scan on a_mail mail0_ (cost=162,055.26..226,888.77 rows=243 width=8) (actual time=7,918.943..7,957.813 rows=311 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 ((date(modify_date_) = CURRENT_DATE) OR ((modify_date_ IS NULL) AND (date(create_date_) = CURRENT_DATE))))
  • Rows Removed by Filter: 10,176
  • Heap Blocks: exact=10,243
  • Buffers: shared hit=274,145
3. 252.045 7,901.886 ↓ 0.0 0 1

BitmapAnd (cost=162,055.26..162,055.26 rows=58,678 width=0) (actual time=7,901.886..7,901.886 rows=0 loops=1)

  • Buffers: shared hit=263,902
4. 147.268 147.268 ↓ 1.1 526,374 1

Bitmap Index Scan on a_mail_current_department_ (cost=0.00..8,262.92 rows=497,554 width=0) (actual time=147.268..147.268 rows=526,374 loops=1)

  • Index Cond: ((current_department_)::text = '299900/06/03'::text)
  • Buffers: shared hit=4,294
5. 7,502.573 7,502.573 ↓ 2.9 30,288,676 1

Bitmap Index Scan on a_mail_mail_status_ (cost=0.00..153,792.31 rows=10,373,276 width=0) (actual time=7,502.573..7,502.573 rows=30,288,676 loops=1)

  • Index Cond: ((mail_status_)::text = ANY ('{Registered,Returned,Forwarded,Arrived,ForDeliveryList,SendedToDeadLetter,RemovedFromForeign}'::text[]))
  • Buffers: shared hit=259,608
Planning time : 0.984 ms
Execution time : 7,974.708 ms