Re: very long update gin index troubles back?
От | Ivan Sergio Borgonovo |
---|---|
Тема | Re: very long update gin index troubles back? |
Дата | |
Msg-id | 20090124182429.1e7ee15d@dawn.webthatworks.it обсуждение исходный текст |
Ответ на | Re: very long update gin index troubles back? (Teodor Sigaev <teodor@sigaev.ru>) |
Ответы |
Re: very long update gin index troubles back?
|
Список | pgsql-general |
On Sat, 24 Jan 2009 15:54:37 +0300 Teodor Sigaev <teodor@sigaev.ru> 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
В списке pgsql-general по дате отправления: