@high-optician-2097 @steep-lamp-91158 I've made further comparison of master and sql-next branch but just turned off tracing in registry_sql.go instead of reverting that patch. The numbers in the filename represents the max pool and max idle pool.
It seems that
• sql-next branch is slower if pool setting is lower (maybe because this branch uses transaction which "locks" a connection for longer time)
• after increased the pool/idlepool then overall auth/s seems equal with the master branch
• with increased connection pool parameters still response time of some of the hydra queries are higher: the initial /oauth2/auth, the /oath2/auth call after login provider, and get login session and accept consents in the consent provider