set index for mdl_auth_saml2_kvstore
During our load tests, we saw slow queries in the auth_saml2_kvstore table. Basically there were items with 'expire' queried.
Setting an index to 'expire' fixed the problem.
Thanks @tholudwig - what size is your kvstore table? (how many records?) - I wonder if the fact that the clean-up on this table is a bit hacky compounds the issue:
we should look at converting this to a task: https://github.com/catalyst/moodle-auth_saml2/blob/cc6505dc7ff1ddda907e3ba86d8c7a571b297f06/classes/store.php#L101
Hi @danmarsden,
we did not have the plugin in permanent in production, so reliable figures are difficult. But given our user traffic, I would assume about >200k entries.