Re: How to speed up word count in tsearch2? - Mailing list pgsql-performance

From Mike Rylander
Subject Re: How to speed up word count in tsearch2?
Date
Msg-id b918cf3d0504010417476720ad@mail.gmail.com
Whole thread Raw
In response to Re: How to speed up word count in tsearch2?  (Yudie Pg <yudiepg@gmail.com>)
List pgsql-performance
On Apr 1, 2005 4:03 AM, Yudie Pg <yudiepg@gmail.com> wrote:
> > You need to look at what else is using RAM on that machine.  And maybe buy
> > more.
>
> Ouch.. I had that feeling also. then how can I know how much memory
> needed for certain amount words? and why counting uncommon words are
> faster than common one?

Because the index is a tree.  You fall of the end of a branch faster
with uncommon words.  Plus the executor goes back to the table for
fewer real rows with uncommon words.

It sounds like you may just need a faster disk subsystem.  That would
shrink the time for the first query on any particular set of words,
and it would make everything else faster as a nice side effect.  What
does your disk layout look like now?

--
Mike Rylander
mrylander@gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org

pgsql-performance by date:

Previous
From: "H.J. Sanders"
Date:
Subject: date - range
Next
From: "Mindaugas Riauba"
Date:
Subject: Tuning PostgreSQL