From: | sunpeng <bluevaley(at)gmail(dot)com> |
---|---|
To: | Ben Carbery <ben(dot)carbery(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: are there any method that "Update" command not affect other unrelated indices? |
Date: | 2010-10-12 22:51:17 |
Message-ID: | AANLkTikkkcH44Vp1=v_fUUQ450+BfKJJNp5JmZ_0SqK3@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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/backend/executor/execMain.c:2135
0x081f3b13
32 ExecutePlan()
/home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:1681
0x081f31c6
31 standard_ExecutorRun()
/home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:309
0x081f0f4b
30 ExecutorRun()
/home/postgres/develop/postgresql-snapshot/src/backend/executor/execMain.c:258
0x081f0e04
29 _SPI_pquery()
/home/postgres/develop/postgresql-snapshot/src/backend/executor/spi.c:2009
0x0821fe8c
28 _SPI_execute_plan()
/home/postgres/develop/postgresql-snapshot/src/backend/executor/spi.c:1831
0x0821facd
27 SPI_execute_plan()
/home/postgres/develop/postgresql-snapshot/src/backend/executor/spi.c:392
0x0821d201
in execMain.c, the call of ExecInsertIndexTuples() is as following:
if (resultRelInfo->ri_NumIndices > 0 && !HeapTupleIsHeapOnly(tuple))
ExecInsertIndexTuples(slot, &(tuple->t_self), estate, false);
2010/10/12 Ben Carbery <ben(dot)carbery(at)gmail(dot)com>
> 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 <bluevaley(at)gmail(dot)com> wrote:
>
>>
>> the question is why all four indices updated in the execution of
>> SPI_execute_plan()?
>> I think there should only one index, that is ind_a4 be updated, how to
>> avoid other three indices updated?
>> thanks!
>>
>>
From | Date | Subject | |
---|---|---|---|
Next Message | ljb | 2010-10-13 00:37:33 | Gripe: bytea_output default => data corruption |
Previous Message | Ben Carbery | 2010-10-12 22:38:15 | Re: are there any method that "Update" command not affect other unrelated indices? |