explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tKaP : Optimization for: Optimization for: plan #jjT8; plan #R0k

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 585.924 14,886.955 ↑ 31.6 26 1

HashAggregate (cost=56,063.16..56,071.37 rows=821 width=20) (actual time=14,886.949..14,886.955 rows=26 loops=1)

  • Group Key: imb_id
2. 12,309.906 14,301.031 ↓ 21.7 1,453,113 1

Bitmap Heap Scan on widgets (cost=36,733.68..55,561.98 rows=66,824 width=12) (actual time=2,009.821..14,301.031 rows=1,453,113 loops=1)

  • Recheck Cond: ((source_id = 30) AND (date > '2019-01-01'::date) AND (date >= '2019-06-06'::date) AND (date <= '2019-06-11'::date))
  • Rows Removed by Index Recheck: 23958526
  • Heap Blocks: exact=49863 lossy=446533
3. 96.866 1,991.125 ↓ 0.0 0 1

BitmapAnd (cost=36,733.68..36,733.68 rows=17,112 width=0) (actual time=1,991.125..1,991.125 rows=0 loops=1)

4. 746.852 746.852 ↓ 4.0 3,507,981 1

Bitmap Index Scan on widgets_source_id_idx (cost=0.00..9,314.95 rows=885,682 width=0) (actual time=746.852..746.852 rows=3,507,981 loops=1)

  • Index Cond: (source_id = 30)
5. 1,147.407 1,147.407 ↓ 1.1 1,653,063 1

Bitmap Index Scan on widgets_pkey (cost=0.00..27,385.07 rows=1,558,150 width=0) (actual time=1,147.407..1,147.407 rows=1,653,063 loops=1)

  • Index Cond: ((date >= '2019-06-06'::date) AND (date <= '2019-06-11'::date))
Planning time : 0.343 ms
Execution time : 14,888.439 ms