Skip to main content

SQL query toolkit in Postgres AI Console – analyze, visualize and share query plans with popular tools

· 2 min read
Denis Morozov
Tanya Samokhvalova

SQL query toolkit

Today we're launching the SQL query toolkit, a tool to analyze, explore, and share SQL queries with plans, that lives inside Postgres AI Console.

Why we built this

Our Postgres AI Joe Bot has always maintained query analysis history, allowing users to revisit analyzed queries, view execution plans, and explore performance visualizations. We've integrated two super popular open-source visualization services, explain.depesz.com and PEV2 (explain.dalibo.com), directly into Postgres AI Console, giving you a secure, private environment to analyze and share queries with your team.

Our approach is "private by default" — your queries and execution plans stay confidential within your workspace. But we know collaboration extends beyond your immediate team.

Core features

The SQL query toolkit lets you bring your own SQL queries and execution plans from any environment, and then analyze them using different visualization tools. The integrated Postgres AI Assistant provides optimization suggestions and explains performance issues based on your actual plans. You can also easily share your analysis with others through simple permalinks that don't require an account to view.

Real-world use case

Let's consider an example. A developer encounters a slow query with multiple subqueries in production. They use the SQL Query Toolkit to:

  1. Import the query and plan - paste the problematic SQL and execution plan into the toolkit

SQL query toolkit

  1. Analyze with visualization tools

SQL query toolkit

  1. Get insights from the Postgres AI Assistant

SQL query toolkit

  1. Share findings - generate a permalink to collaborate with the team on solutions

SQL query toolkit

Getting started

The SQL Query Toolkit is available as part of the postgres.ai platform at https://console.postgres.ai. Just log into Console, navigate to SQL OptimizationAdd Query, and you're good to go!