possibly speed up mysql join when assigning variable types