Panopto / Moodle-2.0-plugin-for-Panopto

Panopto's integration with the Moodle LMS.
http://www.panopto.com
GNU General Public License v3.0
18 stars 38 forks source link

Create index on panopto_foldermap table #145

Closed alex-rowe closed 5 years ago

alex-rowe commented 5 years ago

The mdl_block_panopto_foldermap table is the top of our list of queries that don't use an index.

Here are the top three:

SELECT `panopto_server` FROM `mdl_block_panopto_foldermap` WHERE `moodleid` = ? 
SELECT `panopto_app_key` FROM `mdl_block_panopto_foldermap` WHERE `moodleid` = ? 
SELECT `panopto_id` FROM `mdl_block_panopto_foldermap` WHERE `moodleid` = ? 

Can you add an index/foreign key to mdl_block_panopto_foldermap.moodleid to mdl_course.id in the install.xml file and the upgrade.php file.

Thanks

jmalmsten-panopto commented 5 years ago

Hi,

I believe you should feel free to add any needed indexes to this table at any time. If you need them for your current work please add them.

We have investigated this and are going to add it to a future undetermined release.

We want to make sure when we add this that there is no issues with DB downtime, and we want to make sure we can get these indexes/foreign keys set up on all customers environments regardless of the state of their DB. This will involve some more investigation and potential clean up operations to be ran before actually setting up the indexes/foreign keys which is why the potential release time is undetermined for now.

If you setup your indexes/foreign keys I would not expect any issues, but if you come across any issues please let us know so we will take it into account with our implementation.

Thanks, Joseph Malmsten