Search Postgresql Archives

Re: ts_rank seems very slow (140 ranked documents / second on my machine)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reopening a six months old discussion... Is there any plans to improve ts_rank performance by making it able to use GIN/GIST indices?

From re-reading Oleg answers, I understand FTS indices do not contain enough information for ts_rank. Because of that, ts_rank has to read the ts_vector, which is stored in TOAST table, which triggers a random read for each ranked document.

Cheers,

Nicolas Grilly

On Wed, Jul 13, 2011 at 18:55, Nicolas Grilly <nicolas@xxxxxxxxxxxxxxxx> wrote:
The first query ran in 347 seconds; the second one in 374 seconds.
Conclusion: There is no significant overhead in the ts_rank function
itself. It's slow because ts_rank has to read in random order 40 000
ts_vector stored in TOAST table. The   slow execution time looks like
a direct consequence of storing ts_vector in TOAST table...

>  :( The only solution I see is to store enough information for ranking in index.

Is it the expected behavior? How can I improve that?


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux