Anonymous | Login | Signup for a new account | 2012-09-13 19:33 PDT |
Main | Blog | My View | View Issues | Change Log | Roadmap | IRC Chat | Repositories | Scrum Board |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
187 | Source Integration | SFSVN | public | 2011-01-01 11:59 | 2011-01-25 03:00 | ||||||
Reporter | Jürgen | ||||||||||
Assigned To | |||||||||||
Priority | high | Severity | crash | Reproducibility | have not tried | ||||||
Status | new | Resolution | open | ||||||||
Product Version | |||||||||||
Target Version | Fixed in Version | ||||||||||
Summary | 187: Missing database indices in version 014 | ||||||||||
Description | I came across a Mantis installation today with over a million records in mantis_plugin_Source_file_table and hundreds of thousands of records mantis_plugin_Source_changeset_table. When going to http://www.domain.com/plugin.php?page=Source/index [^] the whole things crashed my server and it took me a while to find out that this was caused by the function stats() in Source.API.php where there is a select statement like this: SELECT COUNT(DISTINCT filename) FROM $t_file_table AS f JOIN $t_changeset_table AS c ON c.id=f.change_id WHERE c.repo_id=# Now, looking into the tables mentiond above there are no indeces defined for neither f.filename nor for f.change_id nor for any of the other fields required for that statement and it doesn't take much to understand that those statements could take hours even on a powerful server. After I've added an individual index on each of those fields, the whole thing worked just fine again. My recommendation would be to add at least those indeces by default if not more. | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
![]() |
|||
Date Modified | Username | Field | Change |
2011-01-01 11:59 | Jürgen | New Issue |
Copyright © 2000 - 2012 MantisBT Group
Time: 0.1404 seconds. memory usage: 8,318 KB |