/supabase-tutorials

How to monitor performance in Supabase?

Learn to optimize your Supabase project with step-by-step guidance on setting up your database, monitoring SQL performance, real-time logs, API metrics, and alerts.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to monitor performance in Supabase?

 

Step 1: Set Up Your Supabase Project

 

First, ensure you have a Supabase account and a project created. If not, go to Supabase and sign up or log in. Once inside the dashboard, create a new project:

  1. Click on the "New Project" button.
  2. Fill in the project details and click "Create new project."

 

Step 2: Prepare Your Database

 

After setting up the project, it's crucial to ensure your database is well-structured for performance monitoring. If required, configure tables, indexes, and relationships:

  • Navigate to the "Table Editor" in the Supabase dashboard.
  • Create tables and define relationships, ensuring proper indexing for efficient query performance.

 

Step 3: Implement SQL Performance Monitoring

 

Supabase provides the ability to monitor SQL performance using the provided dashboards and logs:

  • Access the SQL Editor from the Supabase dashboard.

  • Write your queries efficiently, using tools to analyze query plans and execution times.

  • Example of analyzing a query:

    
    EXPLAIN ANALYZE
    SELECT \* FROM your\_table WHERE column = 'value';
    
  • Review the output to understand query execution issues and optimize as needed.

 

Step 4: Utilize Real-time Logs

 

Supabase offers real-time database logs for monitoring various database aspects. Enable these logs for insights into performance and errors:

  • Go to the "Logs Explorer" section in your Supabase dashboard.

  • Set up filters to focus on specific logs types, like errors or slow queries.

  • Customize log view for better insight using:

    
    -- Example of filtering by slow queries
    SELECT \* FROM logs
    WHERE event\_type = 'query'
    AND execution\_time > 200ms;
    

 

Step 5: Monitor API Performance

 

Supabase's API routes can be monitored using network analysis tools available in your browser:

  • Open the developer tools in your browser (usually by pressing F12).
  • Under the "Network" tab, observe requests made to Supabase endpoints.
  • Monitor timings and payloads for performance bottlenecks.

 

Step 6: Set Up Alerts and Notifications

 

Consider setting up alerts to stay updated on performance issues:

  • Under the "Settings" in Supabase, configure alerts for specific events like errors or high latency.
  • Use webhook integration or email notifications for real-time alerts.

 

Step 7: Analyze and Iteratively Optimize

 

Post initial setup, continuously analyze logs and performance metrics to fine-tune your database:

  • Regularly revisit the Logs Explorer and SQL Editor for new patterns.
  • Adjust database configurations, indices, or query structures in response to observed performance behaviors.

 

By following these steps, you'll establish a robust monitoring system within Supabase, enabling effective oversight and optimization of your projects' performance.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022