less queries on sorting