Watch: Speed up slow database queries with indexes | Vovy
Watch Vovy do it on a Mac: "My Supabase queries are slow, find them and add the right indexes". Vovy finds your slowest Supabase queries, explains why Postgres is scanning whole tables, and adds the indexes Supabase recommends after you approve.
"My Supabase queries are slow, find them and add the right indexes"
Vovy finds your slowest Supabase queries, explains why Postgres is scanning whole tables, and adds the indexes Supabase recommends after you approve.
What happens in the video
- Open the Query Performance report: Vovy opens your project's Query Performance report and sorts by total time, which shows the queries costing you the most overall.
- Explain what each query does: It translates each SQL query into plain English, like "loads all orders for one user, newest first", and matches it to the page in your app.
- Check the Index Advisor: An index is like a book's index: Postgres jumps straight to rows instead of reading them all. Vovy opens the Indexes tab for each slow query.
- Create the index as a migration: It writes the CREATE INDEX statement into a migration file with Cursor so the change lives in your repo, then asks before running it.
- Show before and after timing: Vovy reruns the query with EXPLAIN ANALYZE and shows a card with the old and new time in milliseconds.
Read the step-by-step guideLoading...