Forum OpenACS Development: Re: xotcl-core variable scope with ad_proc methods and filters

The problem is when an questionnaire is loaded, it first loads all sections, then it loads for all sections the questions, all from the CR, one tuple at a time. In the best of all possible worlds, that could be single SQL query producing section objects containing item objects.

Once the machine is hammered to its knees, simple SQL queries taking before a few milliseconds can take up to a few seconds. So it is not just a single query which has to be optimized, it the sheer quantity of queries with their individual overheads.

Currently, we are back to normal:

Active Users: 1072 users in 94 communities active in last 10 minutes, 3200 in last 10 hours (6361 total)
Current System Activity: 4423 exercises last 15 mins, 28.6 views/sec, 1.77 views/min/user, avg. view time: 33.9
Current System Load: 13:35:10 up 62 days, 21:03, 4 users, load average: 5.41, 10.51, 12.49
Current Avg Response Time/sec: 0.20 (last minute), 1.14 (last 30 minutes), 0.72 (last hour), 0.28 (last 10 hours)

Yes, getting every question as a separate query is a bad idea!