Re: very long update gin index troubles back? - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: very long update gin index troubles back?
Date
Msg-id Pine.LNX.4.64.0901241527350.9554@sn.sai.msu.ru
Whole thread Raw
In response to very long update gin index troubles back?  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-general
On Fri, 23 Jan 2009, Ivan Sergio Borgonovo wrote:

> I've a table that contain a tsvector that is indexed (gin) and
> triggers to update the tsvector that should then update the index.
>
> This gin index has always been problematic. Recreation and updates
> were very slow.
>
> Now I had to update 1M rows of that table but for columns
> that doesn't involve the tsvector
> I dropped the trigger to update the tsvector so that when rows get
> updated the trigger won't be called so things should be faster...
> but still it is taking forever.

all indexes will be updated, so if you might want to drop indexes and
rebuild from the scratch.

>
> begin;
>        set constraints all deferred;
>
>        select * from FT1IDX_trigger_drop();
>        update catalog_items set
>         APrice=p.PrezzoA,
>         BPrice=p.PrezzoB
>         from import.catalog_prices p where
>         catalog_items.ItemID=p.id;
>     select * from FT1IDX_trigger_create();
> commit;
>
> function are used since I've 2 triggers actually that I drop and
> create.
>
> Is there anything wrong in the above to make this update so slow on
> a 2x Xeon 3.2GHz 4GbRAM and a RAID1 [sic] I know it is slow on write.
>
>
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

pgsql-general by date:

Previous
From: Harald Armin Massa
Date:
Subject: Installing PostgreSQL on Windows 7 Beta Build 7000 64bit - first results
Next
From: Teodor Sigaev
Date:
Subject: Re: very long update gin index troubles back?