diff --git a/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs b/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs index c1efa0074..cf0a1421e 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs @@ -126,6 +126,14 @@ namespace SqlSugar { StringBuilder batchInsetrSql = new StringBuilder(); int pageSize = 200; + if (this.EntityInfo.Columns.Count > 30) + { + pageSize = 50; + } + else if (this.EntityInfo.Columns.Count > 20) + { + pageSize = 100; + } int pageIndex = 1; int totalRecord = groupList.Count; int pageCount = (totalRecord + pageSize - 1) / pageSize;