Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-13 Thread Vick Khera
On Wed, Oct 13, 2010 at 10:31 AM, Igor Neyman wrote: > All indices need to be updated, because Postgres does not do "upgrade in > place", like some other databases do. > When any column is updated, new version of the row created and the old > one marked as deleted. > If you qualify for a HOT upda

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-13 Thread Igor Neyman
> -Original Message- > From: Alban Hertroys [mailto:dal...@solfertje.student.utwente.nl] > Sent: Wednesday, October 13, 2010 2:38 AM > To: sunpeng > Cc: pgsql-general@postgresql.org > Subject: Re: are there any method that "Update" command not > affect other unrelated indices? > > On

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-12 Thread Alban Hertroys
On 13 Oct 2010, at 24:03, sunpeng wrote: > Hi, I have the following table: > CREATE TABLE A > ( >a1 integer not null, >a2 integer, >a3 integer, >a4 integer > ) > and have the following four indices: > create index ind_a1 on A USING gist(a1); > create index ind_a2 on A USING gist(

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-12 Thread Alban Hertroys
On 13 Oct 2010, at 24:03, sunpeng wrote: > Hi, I have the following table: > CREATE TABLE A > ( >a1 integer not null, >a2 integer, >a3 integer, >a4 integer > ) > and have the following four indices: > create index ind_a1 on A USING gist(a1); > create index ind_a2 on A USING gist(

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-12 Thread sunpeng
Thanks. I could give more clues. The call stack of the function most consumed time is: Thread [1] (Suspended) 34 ExecInsertIndexTuples() /home/postgres/develop/postgresql-snapshot/src/backend/executor/execUtils.c:1046 0x08201e66 33 ExecUpdate() /home/postgres/develop/postgresql-snapshot/src

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-12 Thread Ben Carbery
Well, the objects indices 1,2,3 point to changed when you changed column a4, but I don't know if that's the reason. I would guess that the indices are structured as pointers of some kind though. On Wed, Oct 13, 2010 at 9:03 AM, sunpeng wrote: > > the question is why all four indices updated in t

[GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-12 Thread sunpeng
Hi, I have the following table: CREATE TABLE A ( a1 integer not null, a2 integer, a3 integer, a4 integer ) and have the following four indices: create index ind_a1 on A USING gist(a1); create index ind_a2 on A USING gist(a2); create index ind_a3 on A USING gist(a3); create index ind_a4