A signature collision occurs when different lexemes set identical bit positions in a GiST signature. Matching documents may therefore require table-row rechecks to confirm that the queried lexemes are present. section 6.6.2
Practical consequences of signature collisions include:
- GiST lookups can be slower because matching rows require additional verification. section 6.6.2
- Increasing the signature size from 124 bytes up to 2,024 bytes can reduce collisions. section 6.6.2
Inspecting a GiST search
CREATE INDEX idx_movie_lexemes_gist ON omdb.movies USING GIST (lexemes); EXPLAIN (analyze, costs off) SELECT id, name FROM omdb.movies WHERE lexemes @@ to_tsquery('historical & fight'); The plan uses an Index Scan and reports 0.395 ms execution time.
