Search Postgresql Archives

Re: very long update gin index troubles back?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 24 Jan 2009 15:54:37 +0300
Teodor Sigaev <teodor@xxxxxxxxx> wrote:

> GIN index is slow for update by its construction. When you update
> the rows with or without columns indexed by GIN, postgres (in most
> cases) will insert new records, so index insertion will occur. So,
> for large updates it's much cheaper to drop and create index.
> 
> That was a one of reasons to develop fast_insert_gin patch which
> now in review process.

Somehow the update succeeded... but for better preparing to the
future...

I'm not sure I understood, so I'll provide more details.

I've something like:

create table t1(
 agg tsvector,
 a varchar(10),
 b varchar(10),
 c varchar(10),
 d int
);

then 2 triggers that for every update to t1 fill up agg.

agg:=tsvactor(coalesce(a,'')) || tsvactor(coalesce(b,'')) ||
  tsvactor(coalesce(c,''));

and I have a gin index on agg.

No matter if I drop the trigger that update agg content and the fact
that I'm just updating d, postgresql will update the index?

Right?

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux