The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: add a note on resource management
Div Arora5ffd86297317
diff --git a/web/docs/guides/database/resource-management.mdx b/web/docs/guides/database/resource-management.mdxnew file mode 100644index 00000000000..840a828967d--- /dev/null+++ b/web/docs/guides/database/resource-management.mdx@@ -0,0 +1,21 @@+---+id: resource-management+title: Resource Management+description: Resource management and optimization+---++## Statement Timeouts++By default, Supabase limits the maximum statement execution time to _3 seconds_ for users accessing the API using the anon key, and _8 seconds_ for authenticated users. This serves as a backstop against resource exhaustion due to either poorly written queries, or abusive usage.++The timeout values were picked as a reasonable default for the majority of use-cases, but can be modified using the [ALTER ROLE](https://www.postgresql.org/docs/13/sql-alterrole.html) statement:++```sql+alter role authenticated set statement_timeout = '15s';+```++## Statement Optimization++All Supabase projects come with the [pg_stat_statements](https://www.postgresql.org/docs/13/pgstatstatements.html) extension installed, which tracks planning and execution statistics for all statements executed against it. These statistics can be used in order to diagnose the performance of your project.++This data can further be used in conjunction with the [explain](https://www.postgresql.org/docs/13/using-explain.html) functionality of Postgres to optimize your usage.