![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
We are using IBM DB2 in linux platform version 9.7. We use default CS isolation level and have two programs running concurrently, one insert records and commit every 200 rows while another select those inserted records based on a unique sequence number, from the last obtained sequence number. (select from T1 where sequence number = last sequence number, fetch 50 rows each time. ) We found that some of the rows inserted was missed by the select program. |
|
Any idea why this happen and how to prevent it , if RR isolation level is not prefered. |
|
PC |
#2
| |||
| |||
|
|
Hi, We are using IBM DB2 in linux platform version 9.7. We use default CS isolation level and have two programs running concurrently, one insert records and commit every 200 rows while another select those inserted records based on a unique sequence number, from the last obtained sequence number. (select from T1 where sequence number = last sequence number, *fetch 50 rows each time. ) We found that some of the rows inserted was missed by the select program. Any idea why this happen and how to prevent it , if RR isolation level is not prefered. PC Further clarify, the reason we found some of the rows inserted was missed was because the select start from the last sequence number for 50 rows, we suspect that some row of higher sequence number was seen by the select statement before some with lower sequence number when they are both committed within same unit of work by the inserting program. The question is: is it normal to have inserted rows partially revealed to another selected program running currently and anyway to avoid this? |
#3
| |||
| |||
|
|
We are using IBM DB2 in linux platform version 9.7. We use default CS isolation level and have two programs running concurrently, one insert records and commit every 200 rows while another select those inserted records based on a unique sequence number, from the last obtained sequence number. (select from T1 where sequence number = last sequence number, fetch 50 rows each time. ) We found that some of the rows inserted was missed by the select program. Any idea why this happen and how to prevent it , if RR isolation level is not prefered. PC Further clarify, the reason we found some of the rows inserted was missed was because the select start from the last sequence number for 50 rows, we suspect that some row of higher sequence number was seen by the select statement before some with lower sequence number when they are both committed within same unit of work by the inserting program. The question is: is it normal to have inserted rows partially revealed to another selected program running currently and anyway to avoid this? |
#4
| |||
| |||
|
|
We are using IBM DB2 in linux platform version 9.7. We use default CS isolation level and have two programs running concurrently, one insert records and commit every 200 rows while another select those inserted records based on a unique sequence number, from the last obtained sequence number. (select from T1 where sequence number = last sequence number, fetch 50 rows each time. ) We found that some of the rows inserted was missed by the select program. Any idea why this happen and how to prevent it , if RR isolation level is not prefered. PC Further clarify, the reason we found some of the rows inserted was missed was because the select start from the last sequence number for 50 rows, we suspect that some row of higher sequence number was seen by the select statement before some with lower sequence number when they are both committed within same unit of work by the inserting program. The question is: is it normal to have inserted rows partially revealed to another selected program running currently and anyway to avoid this? Do you have an order by in your select Statement? It would help if you provided the exact SQL syntax used and DDL for the table.- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |