Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / April 2006

Tip: Looking for answers? Try searching our database.

locks and related

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sumanth - 04 Apr 2006 15:07 GMT
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
Phil Sherman - 05 Apr 2006 22:44 GMT
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

> Hello,
>
[quoted text clipped - 19 lines]
> Thanks,
> Sumanth
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.