Removing custom conditions from WHERE clauses for sql_query_range.

This will almost always result in no noticeable speed difference, and is better for a broader range of scenarios.