Defect #8740
closedMysql Out of Memory for query on DB with just 31 issues
100%
Description
Hi, for some reason, a very small setup consisting on 31 issues total, less than 10 users and also less than 10 projects, ends up generating this SQL that on a shared hosting account runs out of memory.
This is the offeinding SQL:
SELECT count(DISTINCT `issues`.id) AS count_all, tracker_id AS tracker_id FROM `issues` LEFT OUTER JOIN `projects` ON `projects`.id = `issues`.project_id LEFT OUTER JOIN `issue_statuses` ON `issue_statuses`.id = `issues`.status_id LEFT OUTER JOIN `trackers` ON `trackers`.id = `issues`.tracker_id WHERE (((projects.id = 5 OR (projects.lft > 7 AND projects.rgt < 8))) AND issue_statuses.is_closed=0) AND (projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) GROUP BY tracker_id
The full DB size is 2.3Mb. I am woking with latest redmine stable 1.1.3. I tested on an old redmine 0.8 release and it works ok.
I would appreciate insights as if this is something normal as it sounds weird that on a production shared hosting account, that tollerates much more complex databases is unable to handle this query, redmine is not viable, as it has very low activity and data volume.
Feel free to ask any other supporting data as you find appropriate.
Hosting company is Hostgator if you ask.
Best regards,
Willie
Updated by Etienne Massip almost 14 years ago
- Category set to Database
This query is pretty common and should not consume that much memory space, did you try to execute with MySQL client ?
Updated by Guillermo Ramhorst almost 14 years ago
- Status changed from New to Resolved
- Assignee set to Guillermo Ramhorst
- % Done changed from 0 to 100
Hi, it ended up being an issue with the web server environment and the mysql server, not even settings related.
Sorry for the hassle.
Best regards,
Willie
Updated by Jean-Philippe Lang almost 14 years ago
- Status changed from Resolved to Closed
- Resolution set to Invalid
Thanks for the feedback.