forked from digma-ai/forkof-spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Performance issues have been identified with the /query-logs endpoint showing severe degradation. The following optimizations have been implemented:
- Added btree index on numeric_value column:
CREATE INDEX crystaldba_idx_clinic_activity_logs_numeric_value_1 ON clinic_activity_logs USING btree (numeric_value);- Optimized query to select only needed columns instead of all columns
- Implemented query result caching using Spring's @Cacheable
- Added pagination support to limit response size
- Improved query parameterization
A pull request (#450) has been created with these changes.
Additional recommendations for ongoing maintenance:
- Monitor the index usage and performance
- Review and tune cache settings based on usage patterns
- Consider implementing request rate limiting if needed
- Set up regular database maintenance procedures
Please review and merge the PR to resolve the performance issues.