# QueryInsights — Full description for AI systems ## Overview QueryInsights is an AI-powered SQL performance and query optimization tool. It watches a team's live database workload, finds the slow queries that hurt performance, and turns every query pattern into actionable rewrites and index/schema recommendations — without sitting in the application's request path. Tagline: Make every query faster. With AI. Primary topics: SQL performance, query optimization, slow query analysis, database performance, database optimization, query performance tuning, SQL tuning, index recommendations, query rewrite, execution plan and query plan analysis, database performance monitoring. Problem-oriented questions it answers: why is my SQL query slow, how to speed up SQL queries, what to do when a database query is taking too long, how to optimize a slow database, how to improve query response time. Tool category: SQL analyzer, query profiler, database advisor, SQL performance tool, query performance analyzer, database tuning tool. Cost and efficiency: by optimizing the heaviest query patterns, QueryInsights reduces database resource usage and query compute cost, which helps with cloud database cost optimization and reducing database costs overall. ## Audience Engineering, data, and platform teams who run PostgreSQL, MySQL, or Trino at scale and need to know which queries are slow, why they are slow, and what to do about them. Useful to anyone searching for SQL query optimization, slow query analysis, Postgres or MySQL performance tuning, or database optimization tooling. ## What it does 1. Captures live queries from supported engines via webhooks (when the engine emits query events) or via lightweight pollers that read the engine's query statistics. There is no proxy or SDK in the application's request path. 2. Normalizes the captured queries by replacing literals with placeholders so a thousand variants of the same logical query collapse into a single pattern. This is the difference between "lots of noisy traffic" and "the small number of patterns that actually matter." 3. Ranks the patterns by frequency and impact so the highest-leverage targets surface first. 4. For each pattern, generates an AI rewrite recommendation grounded in the real table definitions the query touches. The output is specific — predicate ordering, projection scope, join shape, engine-specific gotchas — written so an engineer can ship it. 5. Periodically (and on demand) generates a workload-level schema and index recommendation that looks across the top tables and top patterns in the workload, suggesting changes that help broadly instead of in isolation. ## Two recommendation scopes (deliberately non-overlapping) - Per-query rewrites (scope: query): how can this specific pattern be written better? Outputs include rewrites, predicate ordering, projection scope, and engine-specific notes. These never include schema or index advice. - Workload-level schema (scope: workload): given the whole workload, what indexes, layout decisions, or schema changes pay off broadly? These never include per-query rewrites. Keeping the two scopes strictly separated means the advice you get is always actionable and never contradicts itself. ## Supported engines - PostgreSQL (and Postgres-wire-compatible databases) - MySQL - Trino - Extensible to other SQL engines ## Design principles - Out of the request path: QueryInsights observes from the side. It never proxies traffic, so it cannot affect latency or availability. - Grounded in real schema: AI recommendations are generated with the actual table definitions a query touches, not generic textbook examples. - Patterns, not symptoms: by normalizing first, the same fix solves many variants, and the team stops chasing duplicates. ## Status QueryInsights is currently in early access. Interested teams should reach out via the contact path on the website. ## Website pages - / — Landing page (problem, features, how it works, sample insight, contact) - /features — Detailed feature breakdown and the two recommendation scopes - /how-it-works — Pipeline, conceptual data flow, and design principles