Optimized the output of select when using limit 1