add sort option on query

I wanted to sort results of query.
I can do this with querying all data, then sorts them, but it is very very slow, and it's less memory wasting to use mongodb's sort algorithm.