explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M9eE

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 14.664 243,805.334 ↑ 12.0 1,024 1

Sort (cost=2,435,582.71..2,435,613.43 rows=12,288 width=40) (actual time=243,805.079..243,805.334 rows=1,024 loops=1)

  • Sort Key: frequency
  • Sort Method: quicksort Memory: 129kB
2. 10,723.940 243,790.670 ↑ 12.0 1,024 1

HashAggregate (cost=2,434,594.45..2,434,748.05 rows=12,288 width=40) (actual time=243,789.515..243,790.670 rows=1,024 loops=1)

  • Group Key: frequency, sensor_id
3. 134,586.622 233,066.730 ↓ 5.4 13,255,680 1

Bitmap Heap Scan on frequencies f (cost=147,653.62..2,416,284.02 rows=2,441,391 width=15) (actual time=162,223.267..233,066.730 rows=13,255,680 loops=1)

  • Recheck Cond: ((mac = 'dc:a6:32:00:d0:1e'::macaddr) AND (sensor_id = 15079166))
  • Rows Removed by Index Recheck: 2276995
  • Filter: ((ts >= '1562770247001'::bigint) AND (ts <= '1562856647001'::bigint))
  • Rows Removed by Filter: 8656896
  • Heap Blocks: exact=28512 lossy=191510
4. 98,480.108 98,480.108 ↓ 5.3 23,569,408 1

Bitmap Index Scan on idx_frequencies_mac_sensor_id (cost=0.00..147,043.27 rows=4,470,270 width=0) (actual time=98,480.108..98,480.108 rows=23,569,408 loops=1)

  • Index Cond: ((mac = 'dc:a6:32:00:d0:1e'::macaddr) AND (sensor_id = 15079166))
Planning time : 0.871 ms