Skip to content

Commit 2a3ab60

Browse files
improve performance || is complex query
remove select param while checking because if we have complex subSelect query it will confuse the result. in simple query order is not important
1 parent f4d8a8d commit 2a3ab60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/QueryDataTable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ public function prepareCountQuery(): QueryBuilder
205205
*/
206206
protected function isComplexQuery($query): bool
207207
{
208+
208209
return Str::contains(Str::lower($query->toSql()), ['union', 'having', 'distinct', 'order by', 'group by']);
209210
}
210211

0 commit comments

Comments
 (0)