Forum OpenACS Q&A: Improving Bugtracker performance

Collapse
Posted by Nima Mazloumi on
Hi there,

any chance we can improve the following which is called even twice. I think it is called in the list filters on the index page. The page takes 3 sec to render of which 2.5 secs are from db of which 2.3 sec results from this duplicate db call:

dbqd.bug-tracker.tcl.bug-procs.bug_tracker::bug::get_list.select_action_assignees

1140 ms select dbqd.bug-tracker.tcl.bug-procs.bug_tracker::bug::get_list.select_action_assignees: select nsdb0
select p.first_names || ' ' || p.last_name as name,
crum.user_id,
count(b.bug_id) as num_bugs
from bt_bugs b,
workflow_case_assigned_actions aa left outer join
workflow_case_role_user_map crum on (crum.case_id = aa.case_id and crum.role_id = aa.role_id) left outer join
persons p on (p.person_id = crum.user_id)
where b.project_id = '3809558'
and aa.workflow_id = '3809569'
and aa.action_id = '200'
and aa.object_id = b.bug_id
group by p.first_names, p.last_name, crum.user_id

And the next time:
1157 ms select dbqd.bug-tracker.tcl.bug-procs.bug_tracker::bug::get_list.select_action_assignees

Collapse
Posted by Dave Bauer on
Seems likely nima. Is it the exact same query? Any idea why its called twice? I believe some of this is cached? Does it happen on every call to the page or only the first one?