https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42585

--- Comment #9 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 203797
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203797&action=edit
Bug 42585: Add static performance analyzers

This patch adds ten checks for SQL that's only a problem once there's
real data behind it: order_by_rand, many_joins_no_where,
order_by_no_limit_no_where, group_by_no_where, not_in_subquery,
group_concat_no_where, leading_wildcard_like, correlated_subquery,
union_not_all and function_on_column_in_where.

All ten are scale dependent, so the runner drops them when every table
the EXPLAIN plan touches is small. Dev instances stay quiet, production
instances get the warning.

Test Plan:
1) Apply this patch
2) prove t/Koha/Reports/Analyzer/Check/Static/
3) Analyze a report with the SQL
   "SELECT * FROM borrowers ORDER BY RAND() LIMIT 1"
4) On a dev database with few borrowers, note the finding is
   suppressed!
5) Load enough borrowers that the table isn't small any more and
   analyze again, note the order_by_rand finding now appears!

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to