explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9cyn

Settings
# exclusive inclusive rows x rows loops node
1. 8,429.226 190,370.905 ↑ 1.0 1,024 1

HashAggregate (cost=2,522,734.77..2,522,747.57 rows=1,024 width=36) (actual time=190,369.859..190,370.905 rows=1,024 loops=1)

  • Group Key: ff.frequency
2. 111,820.292 181,941.679 ↓ 5.2 13,255,680 1

Bitmap Heap Scan on frequencies ff (cost=152,994.79..2,510,086.39 rows=2,529,677 width=11) (actual time=115,597.459..181,941.679 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: 2324031
  • Filter: ((ts >= '1562770247001'::bigint) AND (ts <= '1562856647001'::bigint))
  • Rows Removed by Filter: 9159680
  • Heap Blocks: exact=36589 lossy=191562
3. 70,121.387 70,121.387 ↓ 5.3 24,440,832 1

Bitmap Index Scan on idx_frequencies_mac_sensor_id (cost=0.00..152,362.37 rows=4,644,580 width=0) (actual time=70,121.387..70,121.387 rows=24,440,832 loops=1)

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