问一个可能看起来很怪的问题# Database - 数据库
f*e
1 楼
我们公司用Oracle。然后用ibm的一个叫record manager的产品
管理纪录。要处理非常大量的表项。产品里有api进行数据添加
和删除。我们写了个ejb每天固定时间做这些操作。可是在极少
数情况下会出现异常退出。看错误信息是由于duplicate relationship
target name。对应于oracle好象是因为有同样表项已经存在。
我看了一下代码,导致出错的代码段是要进行数据库更新,由于
performance的需要,该段代码先在数据库里删除要
添加的表项,然后立刻添加该项。因为直接更新要花比这两个操作
更长的时间(听起来有点怪,但事实如此)。我们数据库里有大量
数据需要进行更新操作,也就是说要做大量先删除紧接着添加。
啰嗦了这么一大堆,我的问题是有没有可能oracle在删除的时候
没有立即commit才导致产生重复项错误。thx.
管理纪录。要处理非常大量的表项。产品里有api进行数据添加
和删除。我们写了个ejb每天固定时间做这些操作。可是在极少
数情况下会出现异常退出。看错误信息是由于duplicate relationship
target name。对应于oracle好象是因为有同样表项已经存在。
我看了一下代码,导致出错的代码段是要进行数据库更新,由于
performance的需要,该段代码先在数据库里删除要
添加的表项,然后立刻添加该项。因为直接更新要花比这两个操作
更长的时间(听起来有点怪,但事实如此)。我们数据库里有大量
数据需要进行更新操作,也就是说要做大量先删除紧接着添加。
啰嗦了这么一大堆,我的问题是有没有可能oracle在删除的时候
没有立即commit才导致产生重复项错误。thx.