Your performance cost is in two different areas:
- How long it takes to perform the query
- How long it takes to return the results
Often, a query will be fast, but returning results will be slow, since it's I/O-bound. If this is the case, then you will see an approximately linear speedup by returning fewer results.
However, if the query itself is complicated, things are different. If it's not just select * from X
, but select * from X where [complicated-expression]
, then results may vary widely between database implementations. In that case, your performance might be dominated by query complexity, in which case you won't see as much benefit by merely returning fewer results.