SupExplain is an AI Postgres Query Plan Explainer that helps you visualize your queries and optimize performance with AI. Live deployment here
It uses the PEV library to visualize the query plan of your queries, and GPT-4o to analyze your query plan and suggest recommendations
Use this tool to identify inefficiencies in your queries and improve performance
supexplain-intro.mp4
- Open the SQL editor of your supabase project
- Append the following statement to the start of the query and run it
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)
-
Copy the output and paste it into the query plan text area
-
Click the
Analyze Query Plan
button -
If you have enabled AI analysis, the tool will use GPT-4o to analyze the query plan and suggest recommendations. IMP: To enable AI analysis in your local environment, you need to add your
OPENAI_API_KEY
to the.env
file
The tool uses the PEV library to visualize the query plan. You can learn more about the PEV library here.
This tool was built for a Supabase Hackathon. This is not affiliated or endorsed by Supabase
Thank you to the following tools / projects that made this tool possible: