提交 3a0f23d1 编写于 作者: S serge-rider

Mock data load - use TRUNCATE instead of DELETE


Former-commit-id: 6513a529
上级 c1e59c37
......@@ -175,15 +175,7 @@ public class MockDataExecuteWizard extends AbstractToolWizard<DBSDataManipulato
monitor.subTask("Cleanup old data");
DBCStatistics deleteStats = new DBCStatistics();
try {
// TODO: truncate is much faster than delete
try (DBSDataManipulator.ExecuteBatch batch = dataManipulator.deleteData(session, new DBSAttributeBase[]{}, executionSource)) {
batch.add(new Object[]{});
if (JUST_GENERATE_SCRIPT) {
batch.generatePersistActions(session, persistActions);
} else {
deleteStats.accumulate(batch.execute(session));
}
}
dataManipulator.truncateData(session, executionSource);
if (txnManager != null && !autoCommit) {
txnManager.commit(session);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册