explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.043 3,640.020 ↑ 1.0 1 1

Aggregate (cost=14,792.80..14,792.81 rows=1 width=8) (actual time=3,640.020..3,640.020 rows=1 loops=1)

  • Buffers: shared hit=2,773 read=4,853
2. 18.575 3,639.977 ↓ 1.4 343 1

Bitmap Heap Scan on a_mail mail0_ (cost=12,301.91..14,792.74 rows=243 width=8) (actual time=3,626.758..3,639.977 rows=343 loops=1)

  • Recheck Cond: ((((packet_list_ IS NULL) AND (act_item_ IS NULL) AND (date(modify_date_) = CURRENT_DATE)) OR ((packet_list_ IS NULL) AND (act_item_ IS NULL) AND (modify_date_ IS NULL))) AND ((current_department_)::text = '299900/06/03'::text))
  • Filter: (((mail_status_)::text = ANY ('{Registered,Returned,Forwarded,Arrived,ForDeliveryList,SendedToDeadLetter,RemovedFromForeign}'::text[])) 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: 1,360
  • Heap Blocks: exact=1,407
  • Buffers: shared hit=2,773 read=4,853
3. 16.435 3,621.402 ↓ 0.0 0 1

BitmapAnd (cost=12,301.91..12,301.91 rows=2,241 width=0) (actual time=3,621.402..3,621.402 rows=0 loops=1)

  • Buffers: shared hit=1,929 read=4,290
4. 0.004 605.281 ↓ 0.0 0 1

BitmapOr (cost=4,038.85..4,038.85 rows=396,108 width=0) (actual time=605.281..605.281 rows=0 loops=1)

  • Buffers: shared hit=1,921
5. 596.897 596.897 ↓ 1.2 431,017 1

Bitmap Index Scan on packet_act_dts_idx (cost=0.00..3,713.39 rows=363,624 width=0) (actual time=596.897..596.897 rows=431,017 loops=1)

  • Index Cond: ((packet_list_ IS NULL) AND (act_item_ IS NULL) AND (date(modify_date_) = CURRENT_DATE))
  • Buffers: shared hit=1,686
6. 8.380 8.380 ↓ 2.0 65,699 1

Bitmap Index Scan on packet_act_mdf_idx (cost=0.00..325.44 rows=32,484 width=0) (actual time=8.380..8.380 rows=65,699 loops=1)

  • Index Cond: ((packet_list_ IS NULL) AND (act_item_ IS NULL) AND (modify_date_ IS NULL))
  • Buffers: shared hit=235
7. 2,999.686 2,999.686 ↓ 1.1 527,178 1

Bitmap Index Scan on a_mail_current_department_ (cost=0.00..8,263.04 rows=497,577 width=0) (actual time=2,999.686..2,999.686 rows=527,178 loops=1)

  • Index Cond: ((current_department_)::text = '299900/06/03'::text)
  • Buffers: shared hit=8 read=4,290
Planning time : 3.702 ms
Execution time : 3,652.702 ms