Problem Statement
The application already collects MySQL Performance Schema metrics and does query pattern analysis / bottleneck detection. Structurally different but semantically equivalent queries (e.g. same query with different literals/aliases) can currently be counted as separate hotspots.
Proposed Solution
- Normalize SQL statements and generate embeddings (via the
EmbeddingProvider port) for statements collected by the existing performance analysis layer.
- Cluster semantically similar queries (e.g. simple k-NN/cosine similarity) before the bottleneck detection step.
- Surface merged clusters in the existing performance dashboard.
Alternative Solutions
Syntax-only normalization (stripping literals), which likely partially exists already; embeddings help with structurally different but semantically equivalent queries (e.g. reordered JOINs) that syntax normalization misses.
Use Case
More accurate, less duplicated hotspot/bottleneck reports for users analyzing database performance.
Priority Level
Nice to have
Implementation Ideas
- Builds on the existing "Predictive performance insights" roadmap item (trend/anomaly engine).
- Evaluate whether embeddings also improve the "Query pattern analysis" feature mentioned in the README.
Additional Context
Depends on: "EmbeddingProvider port". Optionally related to: "Native vector index foundation" if cluster embeddings should be persisted in Neo4j.
Problem Statement
The application already collects MySQL Performance Schema metrics and does query pattern analysis / bottleneck detection. Structurally different but semantically equivalent queries (e.g. same query with different literals/aliases) can currently be counted as separate hotspots.
Proposed Solution
EmbeddingProviderport) for statements collected by the existing performance analysis layer.Alternative Solutions
Syntax-only normalization (stripping literals), which likely partially exists already; embeddings help with structurally different but semantically equivalent queries (e.g. reordered JOINs) that syntax normalization misses.
Use Case
More accurate, less duplicated hotspot/bottleneck reports for users analyzing database performance.
Priority Level
Nice to have
Implementation Ideas
Additional Context
Depends on: "EmbeddingProvider port". Optionally related to: "Native vector index foundation" if cluster embeddings should be persisted in Neo4j.