dbTalk Databases Forums  

lock allocation

comp.databases.informix comp.databases.informix


Discuss lock allocation in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lehr
 
Posts: n/a

Default lock allocation - 05-04-2011 , 09:26 AM






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

Reply With Quote
  #2  
Old   
Superboer
 
Posts: n/a

Default Re: lock allocation - 05-04-2011 , 10:16 AM






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... (AT) gmail (DOT) com> wrote:
Quote:
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

Reply With Quote
  #3  
Old   
Fernando Nunes
 
Posts: n/a

Default Re: lock allocation - 05-04-2011 , 10:16 AM



Yes. Indexes and I believe VARCHAR columns will consume more locks.
Regards.


On Wed, May 4, 2011 at 3:26 PM, Tom Lehr <tomcaml (AT) gmail (DOT) com> wrote:

Quote:
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 (AT) iiug (DOT) 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...

Reply With Quote
  #4  
Old   
Fernando Nunes
 
Posts: n/a

Default Re: lock allocation - 05-04-2011 , 10:18 AM



Just to add that you can check this easily with "onstat -k". Check the
output (you may filter it by owner)

Regards.

On Wed, May 4, 2011 at 4:16 PM, Fernando Nunes <domusonline (AT) gmail (DOT) com>wrote:

Quote:
Yes. Indexes and I believe VARCHAR columns will consume more locks.
Regards.



On Wed, May 4, 2011 at 3:26 PM, Tom Lehr <tomcaml (AT) gmail (DOT) 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 (AT) iiug (DOT) 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...



--
Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.