The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Updated SQLEditor.constants.ts - Added query to see cache & index hit rate
Kevin Brollyac0bec65e3b9
diff --git a/studio/components/interfaces/SQLEditor/SQLEditor.constants.ts b/studio/components/interfaces/SQLEditor/SQLEditor.constants.tsindex 40a80e8e7b7..b9c908eeae3 100644--- a/studio/components/interfaces/SQLEditor/SQLEditor.constants.ts+++ b/studio/components/interfaces/SQLEditor/SQLEditor.constants.ts@@ -977,6 +977,7 @@ GRANT ALL ON TABLE next_auth.verification_tokens TO service_role;sql: `-- Most frequently called queries-- A limit of 100 has been added below+selectauth.rolname,statements.query,@@ -1052,5 +1053,22 @@ selectmax_time desclimit100;`,+ },+ {+ id: 19,+ type: 'template',+ title: 'Hit rate',+ description: 'See your cache and index hit rate.',+ sql: `-- Cache and index hit rate++select+ 'index hit rate' as name,+ (sum(idx_blks_hit)) / nullif(sum(idx_blks_hit + idx_blks_read),0) as ratio+ from pg_statio_user_indexes+ union all+ select+ 'table hit rate' as name,+ sum(heap_blks_hit) / nullif(sum(heap_blks_hit) + sum(heap_blks_read),0) as ratio+ from pg_statio_user_tables;`,}]