trying to improve performance of mysql