Closed (fixed)
Project:
Decisions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2010 at 22:16 UTC
Updated:
2 Jun 2010 at 15:00 UTC
Currently decisions_view() calls _decisions_meets_quorum() which calls _decisions_count_voters "SELECT COUNT(DISTINCT CONCAT(uid,vote_source)) AS voters FROM {votingapi_vote} WHERE content_id=%d". This query was taking ~2 minutes to run in an environment with ~7 million rows in the votingapi_vote table.
The attached patch changes the code flow so that if both the quorum # of voters required and percentage are 0, further queries related to quorum are not performed when viewing the node.
| Comment | File | Size | Author |
|---|---|---|---|
| decisions-slow.patch | 1.2 KB | ezra-g |
Comments
Comment #1
ezra-g commentedThis seems like a straighforward change and is now committed.