performance optimization

This commit is contained in:
sunkaixuna
2021-11-28 12:46:54 +08:00
parent 6689d3814d
commit bdc669d1fa

View File

@@ -491,7 +491,7 @@ namespace SqlSugar
}
public string GetSqlQuerySql(string result)
{
if (this.IsSqlQuery && (Skip == null && Take == null))
if (this.IsSqlQuery && (Skip == null && Take == null)&&(this.WhereInfos==null||this.WhereInfos.Count==0))
{
var old = result;
var regex = @"^SELECT .* FROM \(((.|\n|\r)*)\) t $";