{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/18086","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/18086/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/18086/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/18086/events","html_url":"https://github.com/owncloud/core/issues/18086","id":99277234,"number":18086,"title":"Queries that run indefinitely ","user":{"login":"fossxplorer","id":3185080,"avatar_url":"https://avatars.githubusercontent.com/u/3185080?v=3","gravatar_id":"","url":"https://api.github.com/users/fossxplorer","html_url":"https://github.com/fossxplorer","followers_url":"https://api.github.com/users/fossxplorer/followers","following_url":"https://api.github.com/users/fossxplorer/following{/other_user}","gists_url":"https://api.github.com/users/fossxplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/fossxplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossxplorer/subscriptions","organizations_url":"https://api.github.com/users/fossxplorer/orgs","repos_url":"https://api.github.com/users/fossxplorer/repos","events_url":"https://api.github.com/users/fossxplorer/events{/privacy}","received_events_url":"https://api.github.com/users/fossxplorer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/feature:sharing","name":"feature:sharing","color":"d4c5f9"},{"url":"https://api.github.com/repos/owncloud/core/labels/performance","name":"performance","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-05T19:14:53Z","updated_at":"2016-03-02T11:38:31Z","closed_at":"2016-03-02T11:38:31Z","body":"Monitoring the DB after upgrade from 7.0.4 -> 8.0.5->8.1.1 beta2, the following queries run for ever: \r\n Copying to tmp table | SELECT `oc_share`.`id`, `item_type`, `item_source`, `item_target`,`oc_share`.`parent`, `share_type`, `share_with`, `uid_owner`,`file_source`, `path`, `file_target`, `oc_share`.`permissions`,`stime`, `expiration`, `token`, `storage`, `mail_send`,`oc_storages`.`id` AS `storage_id`, `oc_filecache`.`parent` as `file_parent` FROM `oc_share` INNER JOIN `oc_filecache` ON `file_source` = `oc_filecache`.`fileid`  AND `file_target` IS NOT NULL INNER JOIN `oc_storages` ON `numeric_id` = `oc_filecache`.`storage`  AND ((`share_type` in ('0', '2') AND `share_with` = 'user99') ) AND `uid_owner` != 'piper' ORDER BY `oc_share`.`id` ASC     | 0.000    |\r\n Copying to tmp table | SELECT `oc_share`.`id`, `item_type`, `item_source`, `item_target`,`oc_share`.`parent`, `share_type`, `share_with`, `uid_owner`,`file_source`, `path`, `file_target`, `oc_share`.`permissions`,`stime`, `expiration`, `token`, `storage`, `mail_send`,`oc_storages`.`id` AS `storage_id`, `oc_filecache`.`parent` as `file_parent` FROM `oc_share` INNER JOIN `oc_filecache` ON `file_source` = `oc_filecache`.`fileid`  AND `file_target` IS NOT NULL INNER JOIN `oc_storages` ON `numeric_id` = `oc_filecache`.`storage`  AND ((`share_type` in ('0', '2') AND `share_with` = 'user11') ) AND `uid_owner` != 'user77' ORDER BY `oc_share`.`id` ASC\r\n\r\nIt's been running for 2 days now with some different values for share_with and uid_owner!\r\nSince our filcache is ~10mill records, avoiding such queries that join filecache would be good.\r\n\r\nTried to grep to see where this query comes from, but i couldn't find it.\r\n[me@centos1 core]\\# git clone https://github.com/owncloud/core.git -b stable8.1\r\n[me@centos1 core]\\# cd core\r\n[me@centos1 core]\\# grep -r 'SELECT\\.\\*\\\\\\*PREFIX\\\\\\*share\\.\\*IS NOT NULL INNER JOIN\\.\\*' \\*\r\n\\#\r\n\r\nThese queries didn't run for ever on stable7.\r\n\r\n## Versions\r\noc 8.1.1 beta2\r\nPHP 5.5.20 \r\nMariaDB 10.0.0.20\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/191200373","html_url":"https://github.com/owncloud/core/issues/18086#issuecomment-191200373","issue_url":"https://api.github.com/repos/owncloud/core/issues/18086","id":191200373,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T11:38:31Z","updated_at":"2016-03-02T11:38:31Z","body":"With forever did you mean they took a long time ?\r\n\r\nCan you try again with 8.2.2 or 9.0 and reopen if this still occurs."}}