View Issue Details

IDProjectCategoryView StatusLast Update
0005207mantisbtperformancepublic2005-04-25 07:47
Reporterpolzin Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Versiongit trunk 
Fixed in Version1.0.0a2 
Summary0005207: Improve performance of "My View"
Description

I noticed that a relevant portion of time for "My view" is spend on


SELECT last_modified FROM mantis_bugnote_table WHERE bug_id='2103' ORDER BY last_modified DESC

and an additional COUNT SQL-Statement. But this information is not used on My view, isn“t it?
Thus, commenting out

grab the bugnote count

    $bugnote_count = bug_get_bugnote_count( $v_id );

[...]
if ( $bugnote_count > 0 ) {
$v_bugnote_updated = bug_get_newest_bugnote_timestamp( $v_id );
}

improved the perfomance noticeably.

Additional Information

I also noticed that the bug_get_bugnote_status calls on view_all_inc.php contribute significantly to the sql-time. I tried adding an index on bug_id and the sql-times for a view_all_inc dropped from 2 sec to 0.2 sec (50 issues per page, ca. 6000 bugnotes in the database). (This was depended on the mysql-version. Older versions did not use the index...)

Is this worth, adding an INDEX?

TagsNo tags attached.

Relationships

related to 0005458 closedthraxisp Slow queries on projects with many bugs and custom fields 

Activities

vboctor

vboctor

2005-04-20 09:56

manager   ~0009847

I have committed to CVS an upgrade step which adds an index on the bug_id field in the bugnotes table.

polzin

polzin

2005-04-21 06:46

reporter   ~0009849

Still the question remains: Why is the bugnote count computed at all, if the value is not used!?
Or did I miss something?

thraxisp

thraxisp

2005-04-21 11:02

reporter   ~0009852

This line (or derivative thereof) is commented out in the latest CVS HEAD.

polzin

polzin

2005-04-21 11:56

reporter   ~0009854

Sorry, this was my mistake. I had a sticky tag in my cvs. :-)

Thanks for patching. From my point of view this issue is resolved now.