[racktables-users] Racktables - Slow Query Speed after upgrade.

Hi,

I recently tried upgrading from 16.5 to 17.6.  Everything seemed ok
running upgrade.php.  However the system is dogged by a slow query when
clicking the Objects tab on the main page.  The query is taking about 50
seconds rather than < 0.02 secs before upgrade.  I have tried to trace
back by checking previous releases and the problem seems to start
between upgrading from 16.6 and 17.0.  The query in the mysql slowlog is:

SELECT tag_id, RackObject.id, RackObject.name, RackObject.label,
RackObject.barcode, RackObject.asset_no, RackObject.objtype_id, (select
rack_id from RackSpace where object_id = id order by rack_id asc limit
1) as rack_id, (select name from Rack where id = rack_id) as Rack_name,
(select row_id from Rack where id = rack_id) as row_id, (select name
from RackRow where id = row_id) as Row_name, RackObject.has_problems,
RackObject.comment, (SELECT COUNT(*) FROM Port WHERE object_id =
RackObject.id) as nports FROM RackObject LEFT JOIN TagStorage on
entity_realm = 'object' and entity_id = RackObject.id ORDER BY
RackObject.name,  tag_id;
# Query_time: 63.154695  Lock_time: 0.003337 Rows_sent: 880 
Rows_examined: 11534564

Any help greatly appreciated.

regards,

Simon




-- 
Simon Cox
Systems Administrator

The Bunker, Ash Radar Station,
Marshborough Road,
Ash
KENT CT13 0PL
United Kingdom

t: 01304 814 890
f: 01304 814 899
e: simon.cox@xxxxxxxxxxxxx
w: www.thebunker.net
PGP on Key Servers



Other related posts: