Re: full text search to_tsquery performance with ispell dictionary - Mailing list pgsql-general

From Tom Lane
Subject Re: full text search to_tsquery performance with ispell dictionary
Date
Msg-id 27829.1305127875@sss.pgh.pa.us
Whole thread Raw
In response to Re: full text search to_tsquery performance with ispell dictionary  (Stanislav Raskin <raskin@livn.de>)
Responses Re: full text search to_tsquery performance with ispell dictionary
List pgsql-general
Stanislav Raskin <raskin@livn.de> writes:
> Is there any way of hack or compromise to achieve good performance without
> losing fts ability?
> I am thinking, for example, of a way to permanently keep a loaded
> dictionary in memory instead of loading it for every connection. As I
> wrote in response to Pavel Stehule's post, connection pooling is not
> really an option.

You really, really, really need to fix whatever is preventing you from
using pooling.  Opening a database connection to run one query is just
horridly inefficient.  Loading a dictionary has evidently raised it past
the threshold where you couldn't ignore it anymore, but that doesn't
mean you weren't paying through the nose before.  A postgres backend
just isn't a lightweight object --- there is all sorts of stuff it has
to cache before it's really up to speed.

            regards, tom lane

pgsql-general by date:

Previous
From: Alex -
Date:
Subject: Query to return every 1st Sat of a month between two dates
Next
From: Adrian Klaver
Date:
Subject: Re: Custom types and JDBC