explain.depesz.com

A tool for finding a real cause for slow queries.

Result: WgQ

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 33264.953 49970.470 ↓ 1.3 11208288 1

Nested Loop (cost=1242.67..109948.80 rows=8557568 width=61) (actual time=198.011..49970.470 rows=11208288 loops=1)

2. 50.227 255.629 ↓ 1.5 728 1

Nested Loop (cost=1242.67..1986.35 rows=488 width=45) (actual time=197.974..255.629 rows=728 loops=1)

  • -> Index Scan using idx_sensor_dpoint_id on sensor s (cost=0.00..0.28 rows=1 width=45) (actual time=0.009..0.010 rows=0 loops=32
3. 110.852 205.402 ↓ 1.3 3280 1

HashAggregate (cost=1242.67..1267.49 rows=2482 width=8) (actual time=197.899..205.402 rows=3280 loops=1)

  • Index Cond: (dpoint_id = l.dpoint_id)
  • Filter: (building_id = 3)
4. 94.550 94.550 ↑ 1.0 62066 1

Seq Scan on locator l (cost=0.00..1086.74 rows=62374 width=8) (actual time=0.013..94.550 rows=62066 loops=1)

5. 16449.888 16449.888 ↑ 1.1 15396 728

Materialize (cost=0.00..1036.70 rows=17536 width=16) (actual time=0.002..22.596 rows=15396 loops=728)

  • -> Index Scan using idx_time_ny_local_key on time_ny t (cost=0.00..949.02 rows=17536 width=16) (actual time=0.023..32.438 rows=1
  • Index Cond: ((local_key >= 201202260000::bigint) AND (local_key <= 201204191155::bigint))