Skip to content
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

Limit the number of prepared statements #1073

Closed
arteymix opened this issue Mar 17, 2024 · 1 comment
Closed

Limit the number of prepared statements #1073

arteymix opened this issue Mar 17, 2024 · 1 comment
Labels
database Issues that involve the database enhancement Enhance the code or user experience performance

Comments

@arteymix
Copy link
Member

arteymix commented Mar 17, 2024

Hibernate query statistics are getting flooded with all the variants of a query that uses a parameter list. This makes it very difficult to inspect query metrics exposed by Micrometer.

This can be mitigated by either using fixed size batch or padding to the next power of two.

Another place that is producing a lot of queries is the filtering system in FilteringDao. In #871 we cut that down by querying clauses independently and intersecting the resulting IDs.

@arteymix arteymix added database Issues that involve the database enhancement Enhance the code or user experience performance labels Mar 17, 2024
@arteymix
Copy link
Member Author

This is pretty much completed at this point. I've added a warning with a stack trace when a large number of parameters are passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Issues that involve the database enhancement Enhance the code or user experience performance
Projects
None yet
Development

No branches or pull requests

1 participant