performance optimization

This commit is contained in:
sunkaixuna
2021-12-07 23:01:35 +08:00
parent 9c381a7e3f
commit 33c621fc55

View File

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