User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:database_optimization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mantisbt:database_optimization [2006/10/30 06:37]
RogerHill
mantisbt:database_optimization [2008/10/29 04:25] (current)
Line 1: Line 1:
 +====== Database Optimization ======
 +
 This page describes some database optimisations for SQL Server 2000. These are based on Mantis 1.0.2 This page describes some database optimisations for SQL Server 2000. These are based on Mantis 1.0.2
  
Line 8: Line 10:
 ===== The Investigation ===== ===== The Investigation =====
  
-The investigation of the problem centered on the filter code in code/​filter_api.php. The function filter_get_bug_rows() is the core of the bug filtering system.+The investigation of the problem centered on the filter code in core/​filter_api.php. The function filter_get_bug_rows() is the core of the bug filtering system.
  
 The existing filter_get_bug_rows() function is 813 lines of code - arguably a candidate for some "​refactoring with extreme prejudice"​ however that is beyond the scope of what I was trying to do here, which was to make MANTIS work acceptably under SQL server with more than 1000 open issues. The existing filter_get_bug_rows() function is 813 lines of code - arguably a candidate for some "​refactoring with extreme prejudice"​ however that is beyond the scope of what I was trying to do here, which was to make MANTIS work acceptably under SQL server with more than 1000 open issues.
Line 108: Line 110:
  #  #
 </​code>​ </​code>​
 +
 +
 +===== Alternative solution by RZG =====
 +
 +NOTE BY RZG:
 +My IMHO simpler solution was to use subqueries. With just 2 small changes, we were able to fix the issues described on my company Mantis, which has well over 10000 issues on it. See [[http://​www.mantisbt.org/​bugs/​view.php?​id=7516|Issue 7516]].
  
 ===== How much difference does it make? ===== ===== How much difference does it make? =====
Line 121: Line 129:
 ===== Future developments ===== ===== Future developments =====
  
-This modification has a number of limitations,​ particularly in that it is very much focused on SQL Server syntax. Ideally we would have an architecture in place in filter_api.php that allowed different database backends to their own optimised search methods. This would probably require ​+This modification has a number of limitations,​ particularly in that it is very much focused on SQL Server syntax. Ideally we would have an architecture in place in filter_api.php that allowed different database backends to use their own optimised search methods. This would probably require ​the implementation of architectural changes to MANTIS to allow for the use of variations in the query strategy with different SQL dialects.  
 + 
 +For SQL server, I think we would want to look at using a stored procedure to return the required dataset for a particular page in view_all_bugs_page.
  
mantisbt/database_optimization.1162208243.txt.gz · Last modified: 2008/10/29 04:31 (external edit)