remove default sort and increase randomness of tmp table in join
PSR2 tidyup