473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

lock escalation : how "expensive"?

Hi folks,
we have a little discussion about lock escalation...

What is better for performance: To have an escalation "early" (smaller
locklist) or aviod the escalation with a big lock list?

We don't care about concurrency - because the changes have to be done,
other SQL waiting for this is OK.

Anyhow - I think: A lock table in exclusive mode would be the the most
performant way. Correct?

Any hints or other points of view?

thx
Stefan

Jun 21 '07 #1
3 2179
stefan.albert wrote:
Anyhow - I think: A lock table in exclusive mode would be the the most
performant way. Correct?
Yes. It's a pretty brutal approach though....
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 21 '07 #2
On 21 Jun., 13:11, Serge Rielau <srie...@ca.ibm.comwrote:
stefan.albert wrote:
Anyhow - I think: A lock table in exclusive mode would be the the most
performant way. Correct?

Yes. It's a pretty brutal approach though....
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Hi Serge,

can you give me a hint: What is better for performance: Early
escalation or late one (or none at all)?

thx
Stefan

Jun 21 '07 #3
stefan.albert wrote:
On 21 Jun., 13:11, Serge Rielau <srie...@ca.ibm.comwrote:
>stefan.albert wrote:
>>Anyhow - I think: A lock table in exclusive mode would be the the most
performant way. Correct?
Yes. It's a pretty brutal approach though....
can you give me a hint: What is better for performance: Early
escalation or late one (or none at all)?
Uhm.. I thought I was explicit enough. Anyway.
Lock escalation means a lot of effort is being wasted. I.e. teh
collecting of all the individual row locks. If you know you will update
the whole table (or you are de-facto alone on the system) you save all
that work by locking the table upfront.
Avoidance of lock-escalation is important to keep concurrency. Something
you say you don't care about.
So I would say:
1. LOCK table
2. Escalate
3. Avoid escalation
(exactly the opposite of what you would normally want)

For read queries in a read only database (perhaps a mart) i recommed
simply running UR.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: Hardy | last post by:
I'm pretty new in this field. when reading some 70x material, I met with this term but cannot catch its accurate meaning. who can help me? thanks in advance:)~
28
by: robert | last post by:
In very rare cases a program crashes (hard to reproduce) : * several threads work on an object tree with dict's etc. in it. Items are added, deleted, iteration over .keys() ... ). The threads are...
45
by: Gregory Petrosyan | last post by:
1) From 2.4.2 documentation: There are two new valid (semantic) forms for the raise statement: raise Class, instance raise instance 2) In python: >>> raise NameError Traceback (most recent...
12
by: spibou | last post by:
Why is a pointer allowed to point to one position past the end of an array but not to one position before the beginning of an array ? Is there any reason why the former is more useful than the...
93
by: jacob navia | last post by:
In this group there is a bunch of people that call themselves 'regulars' that insist in something called "portability". Portability for them means the least common denominator. Write your code...
36
by: Pat | last post by:
Hi, I've run into a strange problem, but one that seems like it might be fairly common. I have a single base class, from which several other classes are derived. To keep the example simple,...
350
by: Lloyd Bonafide | last post by:
I followed a link to James Kanze's web site in another thread and was surprised to read this comment by a link to a GC: "I can't imagine writing C++ without it" How many of you c.l.c++'ers use...
30
by: Medvedev | last post by:
i see serveral source codes , and i found they almost only use "new" and "delete" keywords to make they object. Why should i do that , and as i know the object is going to be destroy by itself at...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.