explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2oGR : Optimization for: plan #i6z

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.831 2,735.384 ↓ 643.0 643 1

Nested Loop (cost=81,280.49..106,763.76 rows=1 width=18) (actual time=536.144..2,735.384 rows=643 loops=1)

2. 2,199.306 2,731.973 ↓ 5.1 645 1

Bitmap Heap Scan on slr_in_out_charges (cost=81,280.06..105,710.26 rows=126 width=18) (actual time=536.089..2,731.973 rows=645 loops=1)

  • Recheck Cond: ((ent_id = 4727) AND (local_dict_root_id = ANY ('{631475,2,4,73359,690738,173,175,182,197,198,30868,631464,14104,683950,1,3,8,181,183,185,191,186,187,188,189,29121,690596,693406,631458,631480,631459,631477,631485,631486,631487,631488, (...)
  • Rows Removed by Index Recheck: 18772
  • Filter: ((NOT is_death_charge) AND (NOT no_show_charge) AND (period_date >= '2020-01-01'::date) AND (period_date <= '2020-01-31'::date) AND (type = ANY ('{1,7}'::integer[])))
  • Rows Removed by Filter: 170807
  • Heap Blocks: exact=13201
3. 2.207 532.667 ↓ 0.0 0 1

BitmapAnd (cost=81,280.06..81,280.06 rows=6,124 width=0) (actual time=532.667..532.667 rows=0 loops=1)

4. 22.843 22.843 ↓ 1.0 237,434 1

Bitmap Index Scan on slr_in_out_charges_dict_root_ent_id (cost=0.00..4,523.22 rows=234,487 width=0) (actual time=22.843..22.843 rows=237,434 loops=1)

  • Index Cond: (ent_id = 4727)
5. 507.617 507.617 ↓ 1.0 4,350,400 1

Bitmap Index Scan on slr_in_out_charges_local_dict_root_id (cost=0.00..76,756.52 rows=4,175,246 width=0) (actual time=507.617..507.617 rows=4,350,400 loops=1)

  • Index Cond: (local_dict_root_id = ANY ('{631475,2,4,73359,690738,173,175,182,197,198,30868,631464,14104,683950,1,3,8,181,183,185,191,186,187,188,189,29121,690596,693406,631458,631480,631459,631477,631485,631486,631487,631488,631484,6314 (...)
6. 2.580 2.580 ↑ 1.0 1 645

Index Scan using slr_employee_pkey on slr_employee u0 (cost=0.42..8.36 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=645)

  • Index Cond: (id = slr_in_out_charges.employee_id)
  • Filter: ((deleted_by_employee_id IS NULL) AND (admission_date <= '2020-01-31'::date) AND (lay_off_date >= '2020-01-01'::date) AND (ent_id = 4727) AND (job_type = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 0
Planning time : 1.881 ms
Execution time : 2,738.103 ms