Re: Similarity search for sentences

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Janek Sendrowski <janek12(at)web(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Similarity search for sentences
Date: 2013-12-05 21:04:16
Message-ID: 1386277456.83303.YahooMailNeo@web162903.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Janek Sendrowski <janek12(at)web(dot)de> wrote:

> I already had a try with gist/gin-index-based trigramm search
> (pg_trgm extension), fulltextsearch (tsearch2 extension) and a
> pivot-based indexing (Fixed Query Array), but it's all to slow or
> not suitable.

When you tried tsearch2, did you use a trigger to store the
tsvector, or did you use a functional index?  I found the former to
be a couple orders of magnitude faster with an index on court
document text.  Likewise, the trigram searches I used in production
had wildly different performance depending on the similarity
threshold or the LIMIT for KNN searches.  You may want to get the
most promising technology to run as fast as you can, and then post
to the pgsql-performance list with the information suggested here:

http://wiki.postgresql.org/wiki/SlowQueryQuestions

The problems may be solvable, but nobody is likely to know what to
suggest without more to work with.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Miles 2013-12-05 22:05:44 cannot delete some records [9.3]
Previous Message John R Pierce 2013-12-05 18:06:24 Re: Fwd: Help!Why CPU Usage and LoadAverage Jump up Suddenly