When to Use GIN and GiST Indexes in PostgreSQL
When a PostgreSQL query searches inside a JSON document, array, or full-text document, a standard B-tree index often does not fit the search. B-trees work well with single…
Read articlePage 7 of 7.
When a PostgreSQL query searches inside a JSON document, array, or full-text document, a standard B-tree index often does not fit the search. B-trees work well with single…
Read articleFor most PostgreSQL queries that look for an exact value, check whether values fall within a span, or return rows in order, start with a B-tree index. A…
Read articleWhen a PostgreSQL query searches inside an array or JSONB document, or looks for terms in full-text search data, a GIN index can find rows that match the…
Read articleIn PostgreSQL, choose a Generalized Search Tree (GiST) index when the rules for a data type’s operators, called its operator class, support the search your query performs. GiST…
Read articleWhen you create an index in PostgreSQL without naming an index type, PostgreSQL creates a B-tree index. An index is a separate structure that helps the database find…
Read articleWhen a database migration passes in staging but disrupts a live service, the migration usually met different conditions in production. A database migration changes the database’s structure, such…
Read articleWhen PostgreSQL runs concurrent transactions at SERIALIZABLE isolation, it guarantees that the committed transactions produce the same result as if they ran one at a time. To keep…
Read articleWhen a migration runs in one long transaction, PostgreSQL keeps its locks until the transaction ends. The migration also leaves more unfinished changes to roll back, and a…
Read articleWhen you change a production database in a Supabase project, old and new versions of the code can run at the same time during deployment. A migration changes…
Read article