From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stanislav Raskin <raskin(at)livn(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: full text search to_tsquery performance with ispell dictionary |
Date: | 2011-05-11 15:31:15 |
Message-ID: | 27829.1305127875@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stanislav Raskin <raskin(at)livn(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2011-05-11 15:32:34 | Re: Custom types and JDBC |
Previous Message | Alex - | 2011-05-11 15:22:11 | Query to return every 1st Sat of a month between two dates |