RefLib

Reference library for AI

Back

postgresql_16:3.8.2.5 GIN

PostgreSQL 16 > The SQL Language > Indexes > Index Types > GIN

GIN indexes are “inverted indexes” which are appropriate for data values that contain multiple component values, such as arrays. An inverted index contains a separate entry for each component value, and can efficiently handle queries that test for the presence of specific component values.

Like GiST and SP-GiST, GIN can support many different user-defined indexing strategies, and the particular operators with which a GIN index can be used vary depending on the indexing strategy. As an example, the standard distribution of PostgreSQL includes a GIN operator class for arrays, which supports indexed queries using these operators: <@   @>   =   && (See (see postgresql_16:3.6.19) for the meaning of these operators.) The GIN operator classes included in the standard distribution are documented in (see gin-builtin-opclasses-table). Many other GIN operator classes are available in the contrib collection or as separate projects. For more information see (see postgresql_16:8.19).

Back