-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Optimize countQuery with complex select #3008
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
ping @yajra |
Co-authored-by: Arjay Angeles <aqangeles@gmail.com>
…ravel-datatables into optimize_count_queries
This reverts commit 117630c.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I am struggling every time with the CI, does StyleCI have an automated fixer ? It would be much easier :) |
No problem with StyleCI, I can automate the PR afterwards. |
There is still a Static Analysis issue: ------ ---------------------------------------------
Line QueryDataTable.php
------ ---------------------------------------------
168 Negated boolean expression is always false.
------ --------------------------------------------- But let me check again further. If it's a false positive, maybe we can just add it to ignored errors? |
yeah I don't understand why it is detected like that |
where you able to check it ? Or do you need more explanation on what the function does ? |
Released on v10.4.4 🚀 including the fixes for phpstan. Thanks! |
When performing subqueries, some of the keywords used to determine if a query is complexe can be found in subqueries inside the main query :
For exemple :
This query was detected as complexe, but the subquery had no impact on the number of records returns,
The subquery was executed and had a huge impact on performance
To force this behavior, you can use the
ignoreSelectsInCountQuery()
on a QueryDatatable :