diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs index 2945e7510..db4f313d2 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs @@ -50,18 +50,43 @@ namespace SqlSugar else { var bigSize = 500; + bigSize = GetBigSize(bigSize); if (groupList.Count < bigSize) { string result = Small(identities, groupList, columnsString); return result; } - else + else { string result = Big(identities, groupList, columnsString); return result; } } } + + private int GetBigSize(int bigSize) + { + var columnCount = this.EntityInfo.Columns.Count; + if (columnCount > 100) + { + bigSize = 15; + } + else if (columnCount > 60) + { + bigSize = 25; + } + else if (columnCount > 40) + { + bigSize = 50; + } + else if (columnCount > 30) + { + bigSize = 100; + } + + return bigSize; + } + private string Big(List identities, List> groupList, string columnsString) { this.Context.Utilities.PageEach(groupList, 100, groupListPasge =>