From the course: Advanced SQL for Query Tuning and Performance Optimization

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

PostgreSQL-specific indexes

PostgreSQL-specific indexes

- [Instructor] In addition to the indexes we've already discussed, PostgreSQL, or Postgres, has some specialized indexes that you won't necessarily find in other relational databases. These include the GiST, the SP-GiST, GIN, and BRIN indexes. Let's take a look at each of these. The GiST index, which stands for generalized search tree, is not a single type of index. It's more like a framework for implementing custom indexes. SP-GiST is an example of one of those indexes that can be implemented with GiST, and SP-GiST stands for space-partitioned GIST, and it supports partitioned search trees, and those are useful when we have nonbalanced or skewed distributions of data, and so SP-GiST is used for nonbalanced data structures. And this is useful because sometimes, we have to support partitions that we don't want to have the same size. GIN indexes are used for text indexing. Now, lookups with GIN are faster than with GiST, but…

Contents