moodle-auth_saml2 icon indicating copy to clipboard operation
moodle-auth_saml2 copied to clipboard

set index for mdl_auth_saml2_kvstore

Open tholudwig opened this issue 4 years ago • 3 comments

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.

tholudwig avatar Jan 15 '21 09:01 tholudwig

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:

danmarsden avatar Jan 18 '21 00:01 danmarsden

we should look at converting this to a task: https://github.com/catalyst/moodle-auth_saml2/blob/cc6505dc7ff1ddda907e3ba86d8c7a571b297f06/classes/store.php#L101

danmarsden avatar Jan 18 '21 00:01 danmarsden

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.

tholudwig avatar Jan 18 '21 08:01 tholudwig