The SQL schema template - indices #81
Replies: 1 comment 3 replies
-
Like you said: every solution has its own needs so for Duende it's hard to implement a one size fits all solution here. Especially since we want to support many database platforms. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
IdentityServer version
7.1
.NET version
8.0
Description
I'm wondering, how are peoples experience with the default SQL DB schema template, that is delivered with IdentityServer7 in larger environments - especially the indeces.
Do you stick to the template, or did you have to do own optimisations?
Ref: https://github.com/DuendeSoftware/products/blob/main/identity-server/templates/src/IdentityServerEntityFramework/Migrations/PersistedGrantDb.sql
At first glance, it seems the default template is a bit more "index-hungry" than I would expect. Eg. there are indexes on ServerSideSessions.DisplayName and on Expires-fields.
(Expires can be slided accordingly many times during a session, so I imagine that indices on such field would trigger very frequent index updates - maybe it is better that cleanup background tasks performs full table scan?)
Back in old days, an DBA learned me to only set indices when you find a need, so I'm considering if we a on a better place starting with a few indices and add on later based on findings.
I know that for such kind of questions, it is hard to provide specific answers, as every solution does have its own needs and behaviour, but I'll still be happy to hear you guys considerations and experiences. Especially if you have serverside sessions is enabled.
Thanks.
Micki
Reproduction steps
No response
Expected behavior
No response
Logs
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions