Minor SQL Performance enhancements. Should've fixed mailing in production