Skip to main content

Standalone SQL query optimizer Early availability

Use Aiven's AI-powered SQL query optimizer for PostgreSQL® and MySQL® to get query optimization recomendations for an ad-hoc query.

important

If you are running a PostgreSQL service, Aiven automatically suggests optimizations for slow queries from the AI insights menu entry. See Optimizing slow queries.

To optimize a query:

  1. Click Tools > SQL query optimizer.
  2. Click Optimize a query.
  3. Select your database type and version.
  4. Paste your query and click Next.
  5. Optional:
    1. Provide your table structure and statistics by running the query provided in the UI.
    2. Paste it in the Query output field.
  6. Click Optimize.

The optimization report shows the optimized query and potential optimal indexes. To learn more about the recommendations, click Optimization details.

Frequently asked questions

Does Aiven AI Optimizer mask/obfuscate my queries?

Yes, Aiven AI Optimizer provides a non-intrusive solution to optimize your database performance without compromising sensitive data access. It achieves this by gathering information on schema structure, database statistics, and other signals to detect potential performance problems and offer optimization recommendations, without requiring credentials or access to the actual data in the database.

To address the possibility of slow query logs containing sensitive data, Aiven offers data masking capabilities that replace sensitive parameters within queries with question marks (?). Data masking is enabled by default.

note

The masking option is not available for the Standalone SQL query optimizer yet.