Monday, July 29, 2013

New concurrent access resolution clauses in V7R1

In V6R1 and V7R1 IBM has added new very powerful clauses to control concurrent access resolution to the SQL language of the IBM i.
So what was wrong with concurrent access till V7R1. When a job changes some rows under commitment control, no other job can access this row even when this job only want to read the data for a query. The job has to wait until the blocking job commits his transaction. The query job can fail if the job reaches the access timeout  before the blocking job has finished his transaction.
But now we have new possibilities to control the behavior in the query job.
New with V6R1 "SKIP LOCKED DATA"
When you add this clause to your select statement the query will ignore every row currently blocked by an uncommited transaction. In my opinion this option is not really an improvement, because with this clause you often get wrong results.
New with V7R1 "USE CURRENTLY COMMITED"
When you add this clause to your select statement the query will ignore uncommited changes, but will process the original values of the locked rows. So the result of the query, will be correct, and the query will not wait for record locks caused by open transactions.
For further informations and examples you can have a look at developer works

No comments:

Post a Comment

ad