473,657 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database Wars: Oracle vs SQL Server Lock Escalation

I was at a conference and had it asserted to me by an Oracle
afficiando that Oracle and DB2 handled low-level locks "better" than
SQL Server, and that this was likely the cause of SQL Server's
relatively slower and more deadlock-prone performance when running the
same application. (SQL does seem to perform more poorly for this app,
a PeopleSoft customer service and billing app.)

Is there any significant difference in lock escalation strategies
between major databases, and if so, what are the implications?

Jeff Roughgarden, MSCD, MCDBA
Jul 20 '05 #1
1 5966
I'm surprised that Oracle dude had a good word for DB2 ;-)

DB2 supports, row (default) and table locks (explicit) and does lock
escalation in specific circumstances. There are numerous lock-avoidance
strategies such as "type 2 indexes" which limit impact of locks on
indexes in case of DML.

SQL Server (for historical reasons I presume) also supports page-locks.
I have little knowledge of SQL Servers locking strategies so I can't,
and shouldn't judge.

Oracle supports a non standard isolation level which gives the
transaction a "snapshot in time" (read consistency).
In this isolation levels readers and writers do not lock each other when
colliding at the same row because a reader would get an old copy.
Often this isolation level is what Oracle fans refer to as the superior
locking strategy.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Jul 20 '05 #2

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

Similar topics

12
7323
by: xixi | last post by:
hi, we are using db2 udb v8.1 on 64 bit windows, this message is in the db2diag.log file ADM5502W The escalation of "38200" locks on table "xxx.xxx" to lock intent "X" was successful. currently i have locklist = 1075, maxlock=60, so based on the formula (((locks held * 36)/ (locklist *4096)) *100) , i have the answer is
9
7356
by: Jane | last post by:
Our db2diag.log is full of messages like this: 2004-05-31-17.15.10.383766 Instance:tminst1 Node:000 PID:394948(db2agent (TMDB1) 0) TID:1 Appid:GA140956.EF26.03A4B1202647 data management sqldEscalateLocks Probe:3 Database:TMDB1 ADM5502W The escalation of "4759" locks on table "I2TM .SHPM_T" to lock intent "S" was successful. The message is always about Shared locks. What can I do to eliminate these errors?
3
5833
by: Amy Woodward | last post by:
Does DB2 have a setting to turn off lock escalation? I've just done several hours of newsgroup googling, and have found only a couple references to such a setting, for DB2 v4.1 back in the late 90's. One of our apps is (fairly) regularly grabbing table locks instead of row locks. I've bumped maxlocks up as high as 95% with locklist at 2048 (4kB chunks). I'm only dealing with a few hundred rows of data in my test environment. And...
2
3683
by: Trent | last post by:
Hello, all. I have the following production DB2 environment. DB2 8.1.4 (fp4) WG edition with 2 production databases on Windows 2003 standard edition. My first question is regard with locking. I found some escalations for X lock on some tables. How do I work out an appropriate MAXLOCK & LOCKTIMEOUT settings to optimize the lock escalation issue.
9
15520
by: kavallin | last post by:
I receives the following in the db2diag.log file many times / day : 2007-03-05-14.55.24.836553+060 E12415C457 LEVEL: Warning PID : 2785 TID : 1 PROC : db2agent (dbname) INSTANCE: db2inst1 NODE : 000 DB : dbname APPHDL : 0-946 APPID: *LOCAL.db2inst1.070305135434 FUNCTION: DB2 UDB, data management, sqldEscalateLocks, probe:3 MESSAGE : ADM5502W The escalation of...
3
2199
by: stefan.albert | last post by:
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
0
3011
by: cburnett | last post by:
Have a peculiar problem regarding lock escalation. Originally lock escalation was occurring because of an application changing most of the rows in a large table. After setting locksize to table to overcome this, still seeing periodic lock escalations (every hour or so) but only of abour 20 rows and for one application at a time. Given a 100MB lock list, why is escalation kicking in and only escalation about 2K of locks? MAXLOCKS would also...
1
773
by: clilush | last post by:
I'm getting entries in the windows event log saying "DB2 is performing lock escalation" which of course is followed by another entrie saying "The escalation of 'xxxx' locks on table 'SYSIBM .SYSCOLDIST' to lock intent 'X' was successful." I'm assuming these are just warnings about the database making it's own adjustments, but I thought I'd be sure before sweeping them under the carpet. Any advice? (DB2 8 Workgroup Edition)
3
7594
by: Frederick Tant | last post by:
DB2 V9.7 The DB is used by 1 application with no concurrent applications. I got the problem that large update/insert cause lock escalation, to solve the issue I set a lock on the table so there's no row locking any more. BUT after setting a lock on a table (LOCK TABLE <table> IN EXCLUSIVE MODE;) I remain having the message " DB2 is performing lock escalation". This together with very bad performance. Any sugestion why LOCK table...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.