アーカイブと削除のプロセス。どれがおすすめ?
このプロセスは、以下の tx との干渉を禁止するために、このトランザクション以外の無関係なトランザクションに対してウィンドウが閉じられる 1 日の終わりに実行されます。
I.一括削除
object = read()
while ( hasNext() )
{
object = next();
call the archive_process to archive the object.
add to delete.
}
batch_delete.
Ⅱ.単一の削除ステートメント。
object = read()
while ( hasNext() )
{
object = next();
call the archive_process to archive the object.
}
use the same sql as above, but instead delete in a single statement.
どれがおすすめ?