Re: For full text indexing, which is better, tsearch2 or

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: For full text indexing, which is better, tsearch2 or
Дата
Msg-id 3FC58097.8090803@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: For full text indexing, which is better, tsearch2 or  (Steve Atkins <steve@blighty.com>)
Ответы Re: For full text indexing, which is better, tsearch2 or  (Steve Atkins <steve@blighty.com>)
Список pgsql-performance
> Does anyone have any metrics on how fast tsearch2 actually is?
>
> I tried it on a synthetic dataset of a million documents of a hundred
> words each and while insertions were impressively fast I gave up on
> the search after 10 minutes.
>
> Broken? Unusable slow? This was on the last 7.4 release candidate.

I just created a 1.1million row dataset by copying one of our 30000 row
production tables and just taking out the txtidx column.  Then I
inserted it into itself until it had 1.1 million rows.

Then I created the GiST index - THAT took forever - seriously like 20
mins or half an hour or something.

Now, to find a word:

select * from tsearchtest where ftiidx ## 'curry';
Time: 9760.75 ms

The AND of two words:
Time: 103.61 ms

The AND of three words:
select * from tsearchtest where ftiidx ## 'curry&green&thai';
Time: 61.86 ms

And now a one word query now that buffers are cached:
select * from tsearchtest where ftiidx ## 'curry';
Time: 444.89 ms

So, I have no idea why you think it's slow?  Perhaps you forgot the
'create index using gist' step?

Also, if you use the NOT (!) operand, you can get yourself into a really
slow situation.

Chris




В списке pgsql-performance по дате отправления:

Предыдущее
От: Steve Atkins
Дата:
Сообщение: Re: For full text indexing, which is better, tsearch2 or
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: For full text indexing, which is better, tsearch2 or