explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XYFe

Settings
# exclusive inclusive rows x rows loops node
1. 87.148 156.836 ↑ 1.0 6,835 1

Hash Left Join (cost=581.76..29,175.28 rows=6,869 width=279) (actual time=15.435..156.836 rows=6,835 loops=1)

  • Hash Cond: ((a.object_type = e.object_type) AND (a.object_id = e.id))
2. 3.900 35.485 ↑ 1.0 6,835 1

Hash Join (cost=580.70..2,075.98 rows=6,869 width=161) (actual time=14.978..35.485 rows=6,835 loops=1)

  • Hash Cond: (a.alarm_rule_id = r.id)
3. 7.416 31.273 ↑ 1.0 6,869 1

Hash Left Join (cost=568.57..1,969.40 rows=6,869 width=145) (actual time=14.620..31.273 rows=6,869 loops=1)

  • Hash Cond: (a.object_id = ca.id)
  • Join Filter: (a.object_type = 2::numeric)
4. 9.511 11.856 ↑ 1.0 6,869 1

Bitmap Heap Scan on alarms a (cost=161.80..1,433.84 rows=6,869 width=95) (actual time=2.554..11.856 rows=6,869 loops=1)

  • Recheck Cond: (state = ANY ('{1,2}'::numeric[]))
  • Filter: (object_type = 2::numeric)
5. 2.345 2.345 ↓ 1.2 8,159 1

Bitmap Index Scan on alarms_state (cost=0.00..160.08 rows=6,869 width=0) (actual time=2.345..2.345 rows=8,159 loops=1)

  • Index Cond: (state = ANY ('{1,2}'::numeric[]))
6. 1.810 12.001 ↑ 1.0 2,860 1

Hash (cost=371.01..371.01 rows=2,860 width=55) (actual time=12.001..12.001 rows=2,860 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 247kB
7. 4.511 10.191 ↑ 1.0 2,860 1

Hash Left Join (cost=176.52..371.01 rows=2,860 width=55) (actual time=4.732..10.191 rows=2,860 loops=1)

  • Hash Cond: (ca.complex_id = co.id)
8. 0.998 0.998 ↑ 1.0 2,860 1

Seq Scan on cvf_camera_registry ca (cost=0.00..151.60 rows=2,860 width=20) (actual time=0.003..0.998 rows=2,860 loops=1)

9. 1.572 4.682 ↑ 1.0 2,334 1

Hash (cost=147.34..147.34 rows=2,334 width=45) (actual time=4.682..4.682 rows=2,334 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 180kB
10. 3.110 3.110 ↑ 1.0 2,334 1

Seq Scan on cvf_complex_registry co (cost=0.00..147.34 rows=2,334 width=45) (actual time=0.018..3.110 rows=2,334 loops=1)

11. 0.029 0.312 ↑ 2.9 33 1

Hash (cost=10.95..10.95 rows=95 width=21) (actual time=0.312..0.312 rows=33 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 2kB
12. 0.283 0.283 ↑ 2.9 33 1

Seq Scan on alarm_rules r (cost=0.00..10.95 rows=95 width=21) (actual time=0.057..0.283 rows=33 loops=1)

13. 0.000 0.028 ↓ 0.0 0 1

Hash (cost=1.04..1.04 rows=1 width=182) (actual time=0.028..0.028 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 0kB
14. 0.028 0.028 ↓ 0.0 0 1

Seq Scan on enemy_objects e (cost=0.00..1.04 rows=1 width=182) (actual time=0.028..0.028 rows=0 loops=1)

  • Filter: (object_type = 2::numeric)
  • Rows Removed by Filter: 3
15.          

SubPlan (for Hash Left Join)

16. 13.670 13.670 ↑ 1.0 1 6,835

Seq Scan on s_alarm_levels l (cost=0.00..1.06 rows=1 width=118) (actual time=0.001..0.002 rows=1 loops=6,835)

  • Filter: (id = a.level)
  • Rows Removed by Filter: 4
17. 6.835 6.835 ↑ 1.0 1 6,835

Seq Scan on s_alarm_states s (cost=0.00..1.05 rows=1 width=58) (actual time=0.001..0.001 rows=1 loops=6,835)

  • Filter: (id = a.state)
  • Rows Removed by Filter: 3
18. 13.670 13.670 ↑ 1.0 1 6,835

Seq Scan on s_object_types t (cost=0.00..1.06 rows=1 width=118) (actual time=0.002..0.002 rows=1 loops=6,835)

  • Filter: (id = a.object_type)
  • Rows Removed by Filter: 4
Total runtime : 157.868 ms