Re: tsearch is slow

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Abbath <abbath(at)invitel(dot)hu>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: tsearch is slow
Date: 2006-03-16 00:33:38
Message-ID: 1142469218.3047.19.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2006-03-15 at 18:09, Abbath wrote:
> Hello Scott,
>
> Wednesday, March 15, 2006, 8:49:00 PM, you wrote:
> >>
> >> I can't guess what the user want to search.
>
> > But that query will likely load up all the index info into memory.
>
> Misunderstanding: I experienced that if I run a search for a keyword
> first time it is slow, then next time it is fast BUT for that keyword,
> not for any keyword.

I think you mean "ONLY for that keyword" there? If everything else
becomes fast but the keyword becomes slow, then we've got a very
interesting (and possibly difficult) problem.

Full text search is the kind of problem you throw ONE database at on a
machine with LOTS of ram. It doesn't need lots of CPU horsepower, or
even disk performance, as long as everything can fit into RAM. Then,
set shared_buffers to 10-15% of the memory size, and let the OS do the
caching.

One of the best performance tuning docs is here:

http://www.varlena.com/GeneralBits/Tidbits/perf.html

> > That statement is pretty telling. You're new to PostgreSQL I'll
> > assume. You'll need to read up on the periodic maintenance section of
> > the docs.
>
> > Here ya go:
> > http://www.postgresql.org/docs/8.1/interactive/maintenance.html
>
> Yes, I have just started to use postgres so I need further experience.
> Thanks for the link.

We all started somewhere. PostgreSQL is a pretty good place to start
learning databases.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2006-03-16 00:34:57 Re: Remote Sync
Previous Message Michael Glaesemann 2006-03-16 00:25:06 Re: question about postgresql time intervals