|
[
Permalink
| « Hide
]
Mine Karakaya added a comment - 29/Mar/09 05:25 PM
Hi, I am planning to do XML admin settings project for my SOC. I have added a patch for this bug as attachment.
Mine Karakaya made changes - 29/Mar/09 05:25 PM
We were getting very poor performance on selects on user_info_data, so we definitely have a need for an index on the userid, but I am not sure what benefit the separate index on fieldid would provide. Do you have any queries in mind that you think the fieldid index would help? I am generally conservative about adding indexes, so if no specific benefit is expected, it should not be added.
Also, neither index as given in the description can be unique. I added the following to my local/db/upgrade.php. if ($result && $oldversion < 2009060600) { $table = new XMLDBTable('user_info_data'); $index = new XMLDBIndex('userid-fieldid'); $index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('userid', 'fieldid')); $result = $result && add_index($table, $index); } Note that this is an index on both userid and fieldid. Although the code for user_info_data inserts implies that the combination of userid and fieldid are unique, I chose not to add such a constraint myself because the benefit would not be great and I would run the risk of the moodle.org code later breaking on my constraint. If we can get this index on both columns added to the core, however, I suggest that it be added as a unique index. +1 for this. We found the same thing here at SFSU too.
+1
At Remote Learner this problem was causing a database to completely lock up when using the browse users filters and including searching on a custom profile field. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||