pgsql: Improve GiST index search performance for trigram regex queries.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve GiST index search performance for trigram regex queries.
Date: 2013-04-15 16:49:37
Message-ID: E1URmb3-0004ak-NM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve GiST index search performance for trigram regex queries.

The initial coding just descended the index if any of the target trigrams
were possibly present at the next level down. But actually we can apply
trigramsMatchGraph() so as to take advantage of AND requirements when there
are some. The input data might contain false positive matches, but that
can only result in a false positive result, not false negative, so it's
safe to do it this way.

Alexander Korotkov

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/410bed2ab8c3864d7f34f9694d080adcaf446352

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2013-04-15 20:21:50 pgsql: Correct handling of NULL arguments in json funcs.
Previous Message Peter Eisentraut 2013-04-14 15:16:41 pgsql: Add serial comma