Bug #70705 | Performance impact of row constructors is not properly documented | ||
---|---|---|---|
Submitted: | 23 Oct 2013 15:42 | Modified: | 21 Mar 2016 16:04 |
Reporter: | Valeriy Kravchuk | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.6 | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[23 Oct 2013 15:42]
Valeriy Kravchuk
[23 Oct 2013 16:30]
MySQL Verification Team
Hello Valeriy, Thank you for the report. Verified as described. Thanks, Umesh
[24 Oct 2013 15:57]
MySQL Verification Team
Valeriy, This is a fully valid documentation request. Also a valid feature request for the optimizer. I have only one small quibble with your example. In the expression (c1,c2) > (1,1), both columns should be greater then 1.
[24 Oct 2013 20:15]
Jeremy Cole
Sinisa, The expression "(c1, c2) > (1, 1)" is equivalent to "(c1 = 1 AND c2 > 1) OR (c1 > 1)". In fact, that's most of the reason for this feature's existence.
[2 Dec 2013 14:28]
MySQL Verification Team
Jeremy, Valeriy, We have run a number of tests and our server behaves properly, in the way that you described. However, this logic is not documented properly at all, which makes this bug fully justified !!!
[21 Mar 2016 16:04]
Paul DuBois
Posted by developer: New section: http://dev.mysql.com/doc/refman/5.7/en/row-constructor-optimization.html
[14 Jul 2019 22:57]
Rick James
The title of the new documentation page says "optimization", implying that row constructor operations might be optimized. However, a hint of the truth is buried in the text: "rewriting the row constructor expression using an equivalent nonconstructor expression may result in more complete index use". To optimize row constructor inequalities you have always (even as recently as 8.0.15) needed to rewrite the query using ANDs and ORs. Please make this clearer in the documentation _and_ think about improving the Optimizer.