invalid relationship graph
- Warn in case of iterative collapse being upgraded to an eager
cursor slurp
+ - No longer order the insides of a complex prefetch subquery,
+ unless required to satisfy a limit
* Fixes
- Properly consider unselected order_by criteria during complex
my $inner_attrs = { %$attrs };
delete $inner_attrs->{$_} for qw/for collapse _prefetch_selector_range select as/;
- # if the user did not request it, there is no point using it inside
- delete $inner_attrs->{order_by} if delete $inner_attrs->{_order_is_artificial};
+ # there is no point of ordering the insides if there is no limit
+ delete $inner_attrs->{order_by} if (
+ delete $inner_attrs->{_order_is_artificial}
+ or
+ ! $inner_attrs->{rows}
+ );
# generate the inner/outer select lists
# for inside we consider only stuff *not* brought in by the prefetch
SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track
FROM cd me
GROUP BY me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track
- ORDER BY cdid
) me
LEFT JOIN tags tags ON tags.cd = me.cdid
ORDER BY cdid