473,396 Members | 1,859 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,396 software developers and data experts.

locks and related

Hello,

My question is a follow up on a recent thread (db2_evaluncommitted)

If I have a table with say a million rows and a predicate of my update
clause matches say 8000 records,
does db2 only lock 8000 records or does it lock records that it evaluates
based on the query plan.
(db2_evaluncommitted=yes, isolation level --> cursor stability

I see locks in the order of 30,000 - 50,000 if there were no statistics
collected on the transaction table

once I executed the run stats, the locks were pretty close to around 8500.
(which is what I expect)

I was assuming only rows that match the predicate will be locked
irrespective of a runstats but i dont see it
that way based on my above observation? can anyone explain me how the
locking mechanism works?
Thanks,
Sumanth

Apr 4 '06 #1
1 1410
Do an explain on the current query. Remove the statistics you added and
redo the explain. If you have different access plans, they you may be
able to account for the difference in locks.

Phil Sherman

Sumanth wrote:
Hello,

My question is a follow up on a recent thread (db2_evaluncommitted)

If I have a table with say a million rows and a predicate of my update
clause matches say 8000 records,
does db2 only lock 8000 records or does it lock records that it evaluates
based on the query plan.
(db2_evaluncommitted=yes, isolation level --> cursor stability

I see locks in the order of 30,000 - 50,000 if there were no statistics
collected on the transaction table

once I executed the run stats, the locks were pretty close to around 8500.
(which is what I expect)

I was assuming only rows that match the predicate will be locked
irrespective of a runstats but i dont see it
that way based on my above observation? can anyone explain me how the
locking mechanism works?
Thanks,
Sumanth

Apr 5 '06 #2

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

Similar topics

1
by: Yannick Turgeon | last post by:
Hello all, I'm using SS 2000 and NT4 (and Access97 as front-end on another server) Well, probably by lack of knowledge about table locks, I don't really know where to start to present this...
0
by: Bruce Pullen | last post by:
DB2 v7.2 (FP7 - DB2 v7.1.0.68) on AIX 5.2.0.0. We're seeing unexpected single row (then commit) insert locking behaviour. We're seeing Applications that already hold row-level W locks in...
4
by: Alex Callea | last post by:
Hi there, We have a web application handling thousands of requests per seconds reading sql server data which is heavily updated. We are generally experiencing no performance problems. On some...
8
by: utagger | last post by:
Hi All, We have a gallery component that allows us to upload images. An Edit Image Entry user control allows the user to update an image, by replacing the current one. Oddly, after replacing...
4
by: Nick Barr | last post by:
Hi, I am trying to gather stats about how many times a resource in our web app is viewed, i.e. just a COUNT. There are potentially millions of resources within the system. I thought of two...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
1
by: shenanwei | last post by:
I have db2 v8.2.5 on AIX V5.3 with all the switches on Buffer pool (DFT_MON_BUFPOOL) = ON Lock (DFT_MON_LOCK) = ON Sort ...
0
by: elphantasmo | last post by:
Hi, I have created a hosted AxWebBrowser control and I handle the NewWindow2 event to open new windows in my own forms. Our application accesses a JSF (Java Server Faces) backend with some...
6
by: CJ | last post by:
Hello Friends - I've run across the following situation. I have two threads, say T1 and T2 which access shared data - each locks a mutex before doing so. Now I have a hard-to-find bug which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.