Poor Performance / Stalls and One Solution - Add Index

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
macleajb
Newbie
Posts: 6
Joined: Fri Sep 20, 2013 2:15 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux

Poor Performance / Stalls and One Solution - Add Index

Postby macleajb » Wed Sep 25, 2013 1:28 am

Hi Folks,

Noticed intermittent stalls. After looking around, found some slow queries:

SELECT `oc_filecache`.`fileid` FROM `oc_filecache` LEFT JOIN `oc_lucene_status` ON `oc_filecache`.`fileid` = `oc_lucene_status`.`fileid` WHERE `storage` = '2016' AND `status` is null OR `status` = "N" limit 1;

Explain said no indexs used on the oc_lucene_status table. Adjusted it :

ALTER TABLE oc_lucene_status ADD INDEX (fileid);

Queries went from 595 seconds to under 3.

Important part is that this query locked the tables. That's a large chunk of time with everyone wondering where OwnCloud went :).

Cheers,
JES

RealRancor
ownCloud master
Posts: 14628
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 8.2.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.6.x

Re: Poor Performance / Stalls and One Solution - Add Index

Postby RealRancor » Wed Sep 25, 2013 9:56 am

Hi,

and thanks for this information. Please post this directly to the bugtracker:

https://github.com/owncloud/apps/issues
Report a bug? / Request a feature? / Developers contact/feedback? See: https://forum.owncloud.org/viewtopic.php?f=17&t=23696

macleajb
Newbie
Posts: 6
Joined: Fri Sep 20, 2013 2:15 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux

Re: Poor Performance / Stalls and One Solution - Add Index

Postby macleajb » Wed Sep 25, 2013 11:54 am

Posted as issue #1382.


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: Bing [Bot] and 0 guests