| Bug #46211 | SQL_BIG_RESULT, SQL_SMALL_RESULT, SQL_BUFFER_RESULT should be mutually exclusive | ||
|---|---|---|---|
| Submitted: | 15 Jul 20:16 | Modified: | 15 Jul 23:46 |
| Reporter: | Paul DuBois | ||
| Status: | Verified | ||
| Category: | Server: Parser | Severity: | S3 (Non-critical) |
| Version: | OS: | Any | |
| Assigned to: | Martin Hansson | Target Version: | |
| Triage: | Triaged: D3 (Medium) | ||
[15 Jul 20:16]
Paul DuBois
[15 Jul 23:46]
Miguel Solorzano
Thank you for the bug report.
[10 Aug 12:10]
Martin Hansson
IMHO: It would not make sense to mix SQL_BIG_RESULT with SQL_SMALL_RESULT. However, both of these should be allowed in combination with SQL_BUFFER_RESULT as they address different issues/bottlenecks. SQL_[BIG|SMALL]_RESULT tells the optimizer how to compute groups or remove duplicates (GROUP BY and DISTINCT constructs, respectively), whereas SQL_BUFFER_RESULT seems to have the intention of alleviating communication bottlenecks between server and client, hence they should be useful even in combination. Example: SELECT SQL_BUFFER_RESULT SQL_SMALL_RESULT MAX(s1.price), (SELECT hires_image FROM sales WHERE date = s1.date and branch = s1.branch and price = max(s1.price)) FROM sales s1 GROUP BY s1.date, s1.branch HAVING MAX(price) > 100; Computing the group might not require that much memory, but sending the result to a client over a narrow bandwidth connection might take long.
[10 Aug 14:53]
Paul DuBois
Martin, thanks for the info. What is the effect if SQL_BIG_RESULT with SQL_SMALL_RESULT are given together? Does one take precedence? Is the effect "undefined"?
