-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorize request protocol validation slow SQL query in v.6 #668
Comments
ClientStore.FindClientByIdAsync:
I guess this makes no sense
as we already have clients filtered out by clientId, and we should not load whole dataset from DB to take single record from it. Replacing it with some projection instead of bunch of |
@Toshik , can you elaborate, how replacing by projection would help here? @brockallen , Is there any interface for IClientStore cache? |
I guess single query is enough as client id is already checked in where
|
@maulik-modi doing Also, using projection allows you to filter out unneeded data to reduce dataset loaded from DB, e.g. exclude expired ClientSecrets |
Have you looked at our caching docs? |
@brockallen caching actually helps, thank you. |
The change is what was recommended to us by the EF team given their changes in 6.0. I'm happy to re-review this, and there is a issue (somewhere -- I'll have to look for it/them) on the history behind these changes. Also, is it possible this is something in the Postgres provider that doesn't work the same as other providers? I don't know Postgres at such a low level, and that's also been the cause of other issues in the past. I'd trust you have more insight on this.
That's due to customers often misconfiguring collation in the DB, so it's an app level mechanism to avoid dups. We've seen it before with various ways people post-configure their DB. This is not your issue, tho, from what I can tell. |
Update to this: #694 (comment) |
Closing this one to track there. Thanks. |
Discussed in https://github.com/DuendeSoftware/IdentityServer/discussions/667
Originally posted by Toshik January 21, 2022
Hello.
I use IS with PostgreSQL (Npgsql EF 6.0.2 driver used)
After upgrading .Net to v.6 and Duende to version 6.0.1 I've met a performance issue. During Login page rendering Identity Server issues some extremely slow SQL queries:
Given my DB has just a few records in it, query result contains over 57K records due to
JOIN
statements multiplication. As a result each query gets executed in 4-6 seconds. With IdentityServer 5.2.3 it works absolutely faster with the same DB data.Taking above in account, I assume with production data amount this query is going to be a show stopper.
The text was updated successfully, but these errors were encountered: