Select top query optimizations.