explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Ej9 : Optimization for: plan #geIX

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.348 141.462 ↓ 155.0 155 1

GroupAggregate (cost=25,065.59..25,065.61 rows=1 width=40) (actual time=141.025..141.462 rows=155 loops=1)

  • Group Key: employee_id, period_date
2. 0.339 141.114 ↓ 1,319.0 1,319 1

Sort (cost=25,065.59..25,065.59 rows=1 width=14) (actual time=141.015..141.114 rows=1,319 loops=1)

  • Sort Key: employee_id
  • Sort Method: quicksort Memory: 111kB
3. 1.116 140.775 ↓ 1,319.0 1,319 1

Bitmap Heap Scan on slr_in_out_charges (cost=20,824.31..25,065.58 rows=1 width=14) (actual time=139.852..140.775 rows=1,319 loops=1)

  • Recheck Cond: ((ent_id = 5103) AND (period_date = '2019-02-01'::date))
  • Filter: ((NOT is_death_charge) AND (NOT no_show_charge) AND (type = 1) AND (source = 3))
  • Rows Removed by Filter: 1169
  • Heap Blocks: exact=248
4. 0.251 139.659 ↓ 0.0 0 1

BitmapAnd (cost=20,824.31..20,824.31 rows=2,169 width=0) (actual time=139.659..139.659 rows=0 loops=1)

5. 4.686 4.686 ↑ 1.0 71,767 1

Bitmap Index Scan on slr_in_out__ent_id_fda727_idx (cost=0.00..1,087.63 rows=75,075 width=0) (actual time=4.686..4.686 rows=71,767 loops=1)

  • Index Cond: (ent_id = 5103)
6. 134.722 134.722 ↓ 1.2 1,488,461 1

Bitmap Index Scan on slr_in_out_charges_period_date (cost=0.00..19,736.43 rows=1,246,649 width=0) (actual time=134.722..134.722 rows=1,488,461 loops=1)

  • Index Cond: (period_date = '2019-02-01'::date)