Notice: this is a static mirror for historical purposes.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
187Source IntegrationSFSVNpublic2011-01-01 11:592011-01-25 03:00
Assigned To 
PriorityhighSeveritycrashReproducibilityhave not tried
Product Version 
Target VersionFixed in Version 
Summary187: Missing database indices in version 014
DescriptionI 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 [^] 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
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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
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
Powered by Mantis Bugtracker

hosted with