Minor query fixes [ci skip]
Initial concat optimization work [ci skip]
Join optimization [ci skip]
Concat keys generated, join optimizer [ci skip]