explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zYT

Settings
# exclusive inclusive rows x rows loops node
1. 3.639 196,058.567 ↑ 1.0 1,024 1

Sort (cost=2,515,834.42..2,515,836.98 rows=1,024 width=36) (actual time=196,058.336..196,058.567 rows=1,024 loops=1)

  • Sort Key: ff.frequency
  • Sort Method: quicksort Memory: 128kB
2. 8,347.889 196,054.928 ↑ 1.0 1,024 1

HashAggregate (cost=2,515,770.42..2,515,783.22 rows=1,024 width=36) (actual time=196,053.841..196,054.928 rows=1,024 loops=1)

  • Group Key: ff.frequency
3. 117,448.973 187,707.039 ↓ 5.3 13,255,680 1

Bitmap Heap Scan on frequencies ff (cost=152,604.26..2,503,155.10 rows=2,523,065 width=11) (actual time=118,499.870..187,707.039 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: 2317106
  • Filter: ((ts >= '1562770247001'::bigint) AND (ts <= '1562856647001'::bigint))
  • Rows Removed by Filter: 9095168
  • Heap Blocks: exact=35996 lossy=191551
4. 70,258.066 70,258.066 ↓ 5.3 24,376,320 1

Bitmap Index Scan on idx_frequencies_mac_sensor_id (cost=0.00..151,973.49 rows=4,631,692 width=0) (actual time=70,258.066..70,258.066 rows=24,376,320 loops=1)

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