mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix query performance links (#38738)
* fix links * fix links * rm nextenv * fix formatting changes
This commit is contained in:
1 parent
b4922199cd
commit
83122eb4c6
5 files changed
+5
-5
No files matched your search
@@ -20,7 +20,7 @@ You can read about Unified egress, included quota, and how to check the egress u
|
||||
While pointing out the exact cause for egress may not be straightforward, there are various steps you can take to determine the source of these issues:
|
||||
|
||||
- Picking the "Top Paths" from the [log explorer](https://app.supabase.com/project/_/logs/explorer/templates) will help you identify heavily queried paths
|
||||
- By finding the most requested queries from Query performance report: https://app.supabase.com/project/_/reports/query-performance
|
||||
- By finding the most requested queries from Query performance report: https://app.supabase.com/project/_/advisors/query-performance
|
||||
- Supavisor Egress is independent of client. There is no direct relation between a single query and Supavisor egress, it is harder to debug and identify. But you can make use of frequent queries from the link in above step that also displays average number of rows which will help to identify queries with a large number of rows returned. While this does not display Supavisor queries specifically, it will give an overview of queries with lots of rows that can help.
|
||||
- For Storage Egress, all outgoing traffic for storage-related requests to download/view your Storage items are considered as Storage egress. We have a "Storage Egress Requests" template in logs explorer that you can use to get the number of requests for each Storage object
|
||||
- If you pull 1mb of data out of the database using the Supavisor connection in your edge function, but only sends 100kb back to the user, you will have the Egress from the Supavisor to your Edge function plus from the edge function to your user
|
||||
|
||||
+1
-1
@@ -13,6 +13,6 @@ You can run this query to check the current settings set for your roles: `SELECT
|
||||
|
||||
To increase the `statement_timeout` for a specific role, you may follow the instructions [here](/docs/guides/database/timeouts#changing-the-default-timeout). Note that it may require a quick reboot for the changes to take effect.
|
||||
|
||||
Additionally, to check how long a query is taking, you can check the Query Performance report which can give you more information on the query's performance: https://app.supabase.com/project/_/reports/query-performance. You can use the [query plan analyzer](https://www.postgresql.org/docs/current/sql-explain.html) on any expensive queries that you have identified: `explain analyze <query-statement-here>;`. For supabase-js/ PostgREST queries you can use `.explain()`.
|
||||
Additionally, to check how long a query is taking, you can check the Query Performance report which can give you more information on the query's performance: https://app.supabase.com/project/_/advisors/query-performance. You can use the [query plan analyzer](https://www.postgresql.org/docs/current/sql-explain.html) on any expensive queries that you have identified: `explain analyze <query-statement-here>;`. For supabase-js/ PostgREST queries you can use `.explain()`.
|
||||
|
||||
You can also make use of Postgres logs that will give you useful information like when the query was executed: https://app.supabase.com/project/_/logs/postgres-logs.
|
||||
+1
-1
@@ -10,7 +10,7 @@ database_id = "1da315be-38ac-487a-b178-f865a1a73c09"
|
||||
message = "insufficient privilege"
|
||||
---
|
||||
|
||||
If you see the error "insufficient privilege" when accessing [pg_stat_statements](/docs/guides/platform/performance#postgres-cumulative-statistics-system) or when accessing [Query Performance Report](/dashboard/project/_/reports/query-performance), it means that the Postgres role does not have required permissions.
|
||||
If you see the error "insufficient privilege" when accessing [pg_stat_statements](/docs/guides/platform/performance#postgres-cumulative-statistics-system) or when accessing [Query Performance Report](/dashboard/project/_/advisors/query-performance), it means that the Postgres role does not have required permissions.
|
||||
|
||||
In this case, you can run the below command to allow the Postgres role to read all statistics from the system:
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export function useReportsGotoCommands(options?: CommandOptions) {
|
||||
{
|
||||
id: 'nav-reports-query-performance',
|
||||
name: 'Query Performance Reports',
|
||||
route: `/project/${ref}/reports/query-performance`,
|
||||
route: `/project/${ref}/advisors/query-performance`,
|
||||
defaultHidden: true,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -304,7 +304,7 @@ const nextConfig = {
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/project/:ref/reports/query-performance',
|
||||
source: '/project/:ref/query-performance',
|
||||
destination: '/project/:ref/advisors/query-performance',
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user