473,399 Members | 4,192 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,399 software developers and data experts.

Waiting for uncommited rows

My select process with isolation level=CS on a table with locksize =
row waits until the other insert process commits.I don't lock the
table level and if I change the select process' isolation level to UR,
it doesn't wait.

I would like to have my processes with CS isolation level to be able to
read all "clean" rows without any wait. How can I make them skip dirty
rows?

Regards,

Mehmet Baserdem

May 11 '06 #1
5 1699
You can do this using DB2 REGISTRY VARIABLES like

DB2_EVALUNCOMMITTED

Check the DB2 ADMIN GUIDE

or using Proper indexes

cheers....
Shashi Mannepalli


Mehmet Baserdem wrote:
My select process with isolation level=CS on a table with locksize =
row waits until the other insert process commits.I don't lock the
table level and if I change the select process' isolation level to UR,
it doesn't wait.

I would like to have my processes with CS isolation level to be able to
read all "clean" rows without any wait. How can I make them skip dirty
rows?

Regards,

Mehmet Baserdem


May 11 '06 #2
Mehmet Baserdem wrote:
My select process with isolation level=CS on a table with locksize =
row waits until the other insert process commits.I don't lock the
table level and if I change the select process' isolation level to UR,
it doesn't wait.

I would like to have my processes with CS isolation level to be able to
read all "clean" rows without any wait. How can I make them skip dirty
rows?

Regards,

Mehmet Baserdem

DB2_EVALUNCOMMITTED
http://publib.boulder.ibm.com/infoce...e/c0011223.htm

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
May 11 '06 #3
Probably you need DB2_SKIPINSERTED.

Let's say, that there are 10 rows in table1.

UserA inserts 1 row without committing data.
UserB issues "select * from table1 with cs" and receives 10 rows. He is
not aware of the newly inserted row, until it's committed.
http://publib.boulder.ibm.com/infoce...n/c0012389.htm

-- Artur Wronski

May 11 '06 #4
Thanks Artur, DB2_SKIPINSERTED register resolved my problem.

DB2_EVALUNCOMMITTED didn't work for me with the following
configuration:
DB2 Client ver 8.1.4 and DB2 server ver 8.2.2

I guess we better to use DB2_SKIPINSERTED register for the db2 servers
of version v8.2.2.

regards

Mehmet Baserdem

May 11 '06 #5
Mehmet,

DB2_EVALUNCOMMITTED just checks if the evaluated row fits the query
criteria.

Let's say there are 10 rows in table table1:
1, 'A'
2, 'B'
3, 'C'
4, 'D'
....
UserA updates row #3 without committing data:
update table1 set col2='X' where col1 = 3

UserB issues:
select * from table1 where col2='A' with cs
and receives one row 1,'A'

Without the registry variable UserB have to wait (as there are no
indexes in table1 and DB2 is forced to do sequential scan).

But this variable can cause some inconsistencies.

If UserB issues:
select * from table1 where col2='C' with cs
will receive no rows, as current evaluated value is 'X'. But if userA
rollback the work the same query will return one row.

So, bottom line is: the variable can increase concurrency when users
are working on excluding data sets (in the same table).

-- Artur Wronski

May 11 '06 #6

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

Similar topics

4
by: francis70 | last post by:
Hi, I have these 2 problem? Is there a way in Oracle to read UNCOMMITED data. i.e. in Oracle the normal behaviour is that a user's updates to a table are visible to other users ONLY when the...
2
by: Bob | last post by:
Does anybody know what might cause the following message to show up in the SQL Server Error Log?: Time out occurred while waiting for buffer latch type 2, bp 0x12260f80, page (5:77914), stat...
3
by: Holyman | last post by:
Hi group I have an application running on a couple of pc's all connecting to the same SQL-serve databaser. The other day one of my applications started a transaction which it never committed...
3
by: Daniel Chou | last post by:
Hello, We are running java applications which uses DB2 as the data store. But sometimes we get the following exception: 2004-04-25 22:51:39,478 FATAL LogService.logFatal(LogSer vice (?:?) -...
0
by: wxqun | last post by:
I'm try tuning a SELECT statement which is used by a Cognos cube on a DB2 V7.2 +FP13. After I did the tuning, the "dynexpln" shows the "total cost" is down to 8214567 from 37345265, also I try to...
0
by: wxqun | last post by:
I'm trying tuning a SELECT statement which is used by a Cognos cube on a DB2 V7.2 +FP13. After I did the tuning, the "dynexpln" shows the "total cost" is down to 8214567 from 37345265, also I try...
0
by: Sam Durai | last post by:
Hello, is there is any snapshot element availble which could give the no of uncommited Insert/Update/Delete stmts there were executed by an application. In the app shap I understand that this...
0
by: prakashgrp | last post by:
Hi, first i am new to sql server: server version is sql server 2000 we used to get lot of blocking session and we thought of use isolation level read uncommited instead of read...
4
by: jankhana | last post by:
Hi all, I'm having an application in that i use Sql Compact 3.5 with VS2008. I'm running multiple threads in my application which contacts the compact database and accesses the row. It...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
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...

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.