Skip site navigation (1) Skip section navigation (2)

Re: Key/Value reference table generation: INSERT/UPDATE performance

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: cedric <cedric(dot)villemain(at)dalibo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, "Richard Huxton" <dev(at)archonet(dot)com>, valgog <valgog(at)gmail(dot)com>
Subject: Re: Key/Value reference table generation: INSERT/UPDATE performance
Date: 2007-05-23 08:04:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On 5/22/07, cedric <cedric(dot)villemain(at)dalibo(dot)com> wrote:
> I made something very similar, and using PL/pgsql is very slow, when using
> perl is very quick.

Another solution is to use tsearch2 for that:
to_tsvector(''simple'', lower(coalesce(field containing words, '''')))
FROM your table');

I don't know if the fact you have an array of words is a must have or
just a design choice. If you have to keep that, you can transform the
array easily into a string with array_to_string and use the same sort
of query.

I don't know what are exactly your speed requirements but it's quite
fast here. If you drop your table and recreate it into a transaction,
it should work like a charm (or you can use TRUNCATE and INSERT INTO).


In response to

pgsql-performance by date

Next:From: Gregory StarkDate: 2007-05-23 08:31:26
Subject: Re: Postgres Benchmark Results
Previous:From: Andreas KostyrkaDate: 2007-05-23 06:32:25
Subject: Re: Tips & Tricks for validating hardware/os

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group