From 6af77360d3b41270ae1169927f11ed7e9a851c03 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Wed, 15 Apr 2026 16:11:21 -0500 Subject: [PATCH] docs: add note about schema cache queries --- docs/references/schema_cache.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/references/schema_cache.rst b/docs/references/schema_cache.rst index 4d5a1f3af..1199670fa 100644 --- a/docs/references/schema_cache.rst +++ b/docs/references/schema_cache.rst @@ -3,10 +3,15 @@ Schema Cache ============ -PostgREST requires metadata from the database schema to provide a REST API that abstracts SQL details. One example of this is the interface for :ref:`resource_embedding`. +PostgREST requires metadata from the database to provide a REST API that abstracts SQL details. One example of this is the interface for :ref:`resource_embedding`. Getting this metadata requires expensive queries. To avoid repeating this work, PostgREST uses a schema cache. +.. note:: + + - Schema cache queries have been optimized over time to stay fast, even on complex databases. You can see a summary of their execution time in :ref:`pgrst_logging` and :ref:`metrics`. + - If the schema cache queries are slow, the most likely cause is *system catalog bloat*, see `issue#3212 `_ for more details. + .. _schema_reloading: Schema Cache Reloading