try query9 with heap, instead of collecting all and sorting at the end
Merge branch '2.0-maint' into 2.1-maint
Merge branch '2.1-maint'