mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-29 19:56:43 +08:00
Batch insertion performance optimization
This commit is contained in:
parent
16915513c1
commit
747569fe41
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user