View Issue Details

IDProjectCategoryView StatusLast Update
0007819mantisbtsqlpublic2007-12-21 23:16
Reporterkan Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilitysometimes
Status closedResolutionfixed 
Product Version1.0.6 
Target Version1.1.0Fixed in Version1.1.0a3 
Summary0007819: It works very slow (function diskfile_is_name_unique)
Description

One day our Mantis starts to show blank page when somebody reports an issue with an attachment. I investigated the problem and found the function diskfile_is_name_unique which works sooo sloooowly for our database (nearly 40 seconds!) and moreover, this function can be called several times!
I have added an index to the mysql table 'mantis_bug_file_table' for the field 'diskfile'. As result seems it works for me now.

TagsNo tags attached.

Relationships

has duplicate 0007827 closedvboctor MD 5 Upload Problems when more than 5 K Files in Mantis (1,5 GB Filesize) 

Activities

kan

kan

2007-03-14 07:20

reporter   ~0014181

mysql v5.0 (win32)

vboctor

vboctor

2007-03-15 02:50

manager   ~0014183

I moved this to "SQL" category since it is not specific to MySQL.

kan

kan

2007-03-15 12:14

reporter   ~0014190

I think it will be useful, to review whole code to find all other possible places which may require an index.

vboctor

vboctor

2007-03-16 00:13

manager   ~0014192

Add the following line at the end of admin/schema.php before the ?>. Then logout from Mantis and click the upgrade link that will show up on the login page.

$upgrade[] = Array('CreateIndexSQL',Array('idx_diskfile',config_get('mantis_bug_file_table'),'diskfile'));

Please open new bugs for any other cases where there is a needed index that is missing.

Please re-open this bug if this patch doesn't fix your performance problem.