lock allocation
Posted in 2011
Topics: General Discussion
i am running a dummy update to remove an in place alter.
update t_contact set first_name=first_name where 1=1;
i am curious for this table which is less than one million rows why
the engine would dynamically allocate 2 million locks. the first
million make sense to me but why more locks than rows in the tables?
is it due to indexes?
thanks
tom
Hello Tom,
yes it could be indexes, also rows may be moved from their current
page to a different one.
This will change the indexes too.
i would lock the table in exclusive mode or update it in smaller
pieces using a cursor or unlogged or..
Superboer.
On 4 mei, 16:26, Tom Lehr <tomc...@gmail.com> wrote:
> i am running a dummy update to remove an in place alter.
>
> update t_contact set first_name=first_name where 1=1;>
> i am curious for this table which is less than one million rows why
> the engine would dynamically allocate 2 million locks. the first
> million make sense to me but why more locks than rows in the tables?
> is it due to indexes?
>
> thanks
> tom
Yes. Indexes and I believe VARCHAR columns will consume more locks.
Regards.
On Wed, May 4, 2011 at 3:26 PM, Tom Lehr <tomcaml@gmail.com> wrote:
> i am running a dummy update to remove an in place alter.
>
> update t_contact set first_name=first_name where 1=1;>
> i am curious for this table which is less than one million rows why
> the engine would dynamically allocate 2 million locks. the first
> million make sense to me but why more locks than rows in the tables?
> is it due to indexes?
>
> thanks
> tom
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...