It is currently possible to end up with multiple consecutive LIMIT in a query.
This is especially likely when combined with other query optimizations (such as those that drop unneeded ORDER BY), as mentioned in #34831
Removing them avoids nesting queries and in some cases makes it possible to use a simpler join instead of an apply.
It is currently possible to end up with multiple consecutive
LIMITin a query.This is especially likely when combined with other query optimizations (such as those that drop unneeded
ORDER BY), as mentioned in #34831Removing them avoids nesting queries and in some cases makes it possible to use a simpler join instead of an apply.