mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #27476
[Bug 1456849] A change has been merged
Reviewed: https://reviews.mahara.org/4822
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/8757a5c282e3f962b4d897476201142e6238769a
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 8757a5c282e3f962b4d897476201142e6238769a
Author: Jono Mingard <jonom@xxxxxxxxxxxxxxx>
Date: Fri Jun 5 16:43:35 2015 +1200
Make user queries in registration report generation more scalable (Bug
#1456849).
Users in an institution are now queried each time they are needed,
rather than being stored in an array and passed in with ?
Change-Id: I8e49c22d8247dbde3108f52d619f419cec5bb14c
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1456849
Title:
Problem with prepared statements in stats functions
Status in Mahara ePortfolio:
In Progress
Bug description:
Failed to get a recordset: postgres8 error: [-1: number of parameters must be between 0 and 65535] in EXECUTE("
SELECT (0.0 + COUNT(id)) / NULLIF(COUNT(DISTINCT "owner"), 0)
FROM "view"
WHERE id IN (?,? ... ?,?)
and values was (2848,81339 ... 123,456)
The full error shows 65000+ question marks etc
There are a bunch of functions that generate stats but are poorly
written (in lib/registration.php I think) where it tries to get info
by passing in every user id that relates to the search as a prepared
statement value - but when we have too many users (like on Mahara.org)
it dies as there is a maximum number of ? we can have in prepared
statement before the underlying database chokes.
Need to rewrite the stats so that they scale better
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1456849/+subscriptions
References