Closed (fixed)
Project:
Quiz
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
31 Jul 2009 at 20:17 UTC
Updated:
8 Feb 2010 at 11:28 UTC
I'm looking through the query log performance for quiz and noticing that some of them are surprisingly slow. Surprising until you look at the table defs and see that there's very little use of indices. E.g. quiz_node_relationship, which gets huge, doesn't have any indices.
Adding in indices is pretty easy and has almost no potential for bad side-effects. In my testing so far, adding the proper indices to quiz_choice_answer() dropped a 5 ms query down to 0.6 ms. These do add up.
Another performance problem is suboptimal queries. E.g. the DISTINCT in _quiz_get_questions() slows it down by a factor of two.
Comments
Comment #1
mbutcher commentedYeah, definitely add indices wherever they would help. sdboyer and I started doing that a while back, but there were too many things to do and we never finished. I'm also all for re-writing slow queries and getting rid of DISTINCT where possible.
Keep in mind, though, that the SQL is supposed to be PostGreSQL compliant. As of Quiz 3, things were running fine on pgsql. I'd like to keep it that way.
Comment #2
falcon commentedComment #3
falcon commentedI hope this has been significantly improved by now. Please open new issues on specific slow queries/pages if you find any.
Comment #4
turadg commentedNice job on performance, Falcon.
If anyone's using PostgresQL, please let us know whether the current dev snapshot is working okay there.
Comment #5
falcon commented