-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.1
-
MOODLE_401_STABLE
We can improve the performance of system/custom reports by not requesting the same data multiple times, e.g. when two or more columns select the same table fields
Assume report contains 3 columns, which select fields as follows:
- column1
- id
- name
- colour
- column2
- name
- altname
- column3
- id
- location
We end up with something like the following
SELECT
|
id AS c1_id, name AS c1_name, colour AS c1_colour,
|
name AS c2_name, altname AS c2_altname,
|
id AS c3_id, location AS c3_location
|
FROM ...
|
Report builder should optimise the query and remove the duplicate fields being selected (in this trivial case: id, name)