pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Rylander <mrylander@gmail.com>
To: Yudie Pg <yudiepg@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to speed up word count in tsearch2?
Date: Fri, 1 Apr 2005 12:17:56 +0000
Message-ID: <b918cf3d0504010417476720ad@mail.gmail.com> (raw)
In-Reply-To: <e460d0c050331200322bd9ea3@mail.gmail.com>
References: <e460d0c05033111584290bc6c@mail.gmail.com>
	<200503311250.45932.josh@agliodbs.com>
	<e460d0c050331200322bd9ea3@mail.gmail.com>

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



view thread (4+ messages)

Message-ID: <b918cf3d0504010417476720ad@mail.gmail.com>
Permalink:  ../b918cf3d0504010417476720ad@mail.gmail.com/
Also on:    postgresql.org/message-id/b918cf3d0504010417476720ad@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mrylander@gmail.com, yudiepg@gmail.com
  Subject: Re: How to speed up word count in tsearch2?
  In-Reply-To: <b918cf3d0504010417476720ad@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox