Add index (courseid) to bigbluebuttonbn_logs
After running a very busy moodle site with a lot of BBB activities(more than 2000 simultaneous users in conferences) I realized that when users try to join conferences the following SQL query is performed:
SELECT COUNT from bigbluebuttonbn_logs WHERE courseid ...
This query consumes a lot of CPU time on the SQL server (MariaDB) making the database to respond very slow. Adding the proposed index (courseid) made a huge difference.
Partialy covered by PR#235