Skip to content

Multi-column GIN index for combined scope and text searches

We use single-column GIN trigram indexes for text search. Investigate if a multi-column GIN index that combines scope and text columns helps us with e.g. group search.

Example:

Index on `issues`: `GIN(project_id, title gin_trgm_ops)`
Query example: `WHERE project_id = ? AND title ~* 'foo'

For the issues example:

  • Increase in size of the index
  • Benchmark queries
Edited by Andreas Brandl