explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z464

Settings
# exclusive inclusive rows x rows loops node
1. 0.206 209.573 ↑ 1.0 126 1

Sort (cost=700.52..700.85 rows=131 width=18,421) (actual time=209.564..209.573 rows=126 loops=1)

  • Sort Key: equipment_instance.label
  • Sort Method: quicksort Memory: 62kB
2. 0.080 209.367 ↑ 1.0 126 1

Group (cost=692.64..695.91 rows=131 width=18,421) (actual time=209.283..209.367 rows=126 loops=1)

  • Group Key: equipment_instance.id, ehd.device_instance_id, ehd.beacon_uuid, ds.id, (lower(ds.date_range)), (lower(ehd.associate_date_range)), client.name
3. 0.112 209.287 ↑ 1.0 126 1

Sort (cost=692.64..692.96 rows=131 width=18,389) (actual time=209.277..209.287 rows=126 loops=1)

  • Sort Key: equipment_instance.id, ehd.device_instance_id, ehd.beacon_uuid, ds.id, (lower(ds.date_range)), (lower(ehd.associate_date_range)), client.name
  • Sort Method: quicksort Memory: 61kB
4. 0.082 209.175 ↑ 1.0 126 1

Hash Left Join (cost=212.38..688.03 rows=131 width=18,389) (actual time=1.830..209.175 rows=126 loops=1)

  • Hash Cond: (equipment_instance.from_application = client.id)
5. 0.209 209.061 ↑ 1.0 126 1

Hash Right Join (cost=210.89..685.47 rows=131 width=18,384) (actual time=1.783..209.061 rows=126 loops=1)

  • Hash Cond: (ds.device_instance_id = ehd.device_instance_id)
  • Join Filter: ((equipment_instance.status)::text = 'IN_USE'::text)
6. 207.187 207.187 ↑ 1.0 755 1

Index Scan using idx_device_session_status on device_session ds (cost=0.43..463.89 rows=786 width=18,227) (actual time=0.037..207.187 rows=755 loops=1)

  • Index Cond: (status = 'active'::device_session_status)
7. 0.074 1.665 ↑ 1.0 126 1

Hash (cost=208.82..208.82 rows=131 width=161) (actual time=1.664..1.665 rows=126 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 28kB
8. 0.129 1.591 ↑ 1.0 126 1

Hash Right Join (cost=171.48..208.82 rows=131 width=161) (actual time=0.861..1.591 rows=126 loops=1)

  • Hash Cond: (ehd.equipment_instance_id = equipment_instance.id)
9. 0.674 0.674 ↑ 1.0 432 1

Index Only Scan using equipment_has_device_device_instance_id_beacon_uuid_equipm_excl on equipment_has_device ehd (cost=0.15..36.34 rows=434 width=62) (actual time=0.060..0.674 rows=432 loops=1)

  • Index Cond: (associate_date_range @> now())
  • Heap Fetches: 235
10. 0.072 0.788 ↑ 1.0 126 1

Hash (cost=169.70..169.70 rows=131 width=103) (actual time=0.787..0.788 rows=126 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 25kB
11. 0.716 0.716 ↑ 1.0 126 1

Seq Scan on equipment_instance (cost=0.00..169.70 rows=131 width=103) (actual time=0.021..0.716 rows=126 loops=1)

  • Filter: (((status)::text <> 'DELETED'::text) AND (cluster_id = ANY ('{603,1207,5045,5048,5486,2420,5505,5045,15520,15691}'::integer[])))
  • Rows Removed by Filter: 1,142
12. 0.010 0.032 ↑ 1.0 22 1

Hash (cost=1.22..1.22 rows=22 width=64) (actual time=0.032..0.032 rows=22 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
13. 0.022 0.022 ↑ 1.0 22 1

Seq Scan on client (cost=0.00..1.22 rows=22 width=64) (actual time=0.014..0.022 rows=22 loops=1)

Planning time : 2.424 ms
Execution time : 209.741 ms