Bug 33116 - Limit reports execution time with SQL variables
Summary: Limit reports execution time with SQL variables
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-02 14:24 UTC by Didier Gautheron
Modified: 2023-04-23 13:01 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 33116: Add sql statement limit to report query (2.22 KB, patch)
2023-03-03 11:39 UTC, Didier Gautheron
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Didier Gautheron 2023-03-02 14:24:52 UTC
Users' SQL reports can run for a very long time and users can create cartesean products which severely impact server performance.
Moreover it doesn't help there's a lot of sample koha reports using the old cartesean prone join synxtax.

This patch add two optional koha-conf parameters:
- report_sql_max_statement_time for mysql sql_max_statement_time
- report_sql_max_join_size for sql_max_join_size
Comment 1 Didier Gautheron 2023-03-03 11:39:57 UTC
Created attachment 147689 [details] [review]
Bug 33116: Add sql statement limit to report query
Comment 2 Magnus Enger 2023-04-12 07:26:54 UTC
Is this "work in progress" or should it be "Needs Signoff"? 

If it is meant for signoff, I think it also needs to update etc/koha-conf.xml, and include a test plan. But this sure sounds like something that will be a good thing to have!