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