mardi 6 janvier 2015

count mismatch in sql browser and java JDBC, due to high transaction

As im using sql server 2005 r2. There is more concurrent access on this table1 . when i execute the following query in sql browser im getting 2000 records, but when the same query is executed with java, no of records r varied.



EX: 1st execution --> 2000 records,
2nd execution --> 2005 records,
3rd execution --> 1990 records


select REGISTRATION_NO as TOTAL_ASSETS_COUNT from Contable1 a
inner join table2 b on a.REGISTRATION_NO = b.Registration_no and a.System_id=b.System_id
inner join table3 c on b.Registration_no=c.VehicleNo and b.System_id=c.System_id
where a.CLIENTID = ? and a.System_id = ? and b.User_id=?


im using isolation level as READ COMMITTED.


Due to high transaction on table1 the count is varied. please help to resolve why the count is varied in java.


thanks in advance.


Aucun commentaire:

Enregistrer un commentaire