Do you really need to return all million records? Or is there some distinguishing characteristic that you can use to limit the amount of records. i.e. is there a indexed field that is sequenced, for instance? Or a date field that could be used to break the dataset into smaller chunks. If this is something that needs to be done on a regular basis, it would be worth your while to add an indexed field, auto filled from a sequence for this very purpose. Then, you can build a stored procedure in Oracle to return only the data you request. And, being indexed, the query wouldn't take long at all, whether the records were from the first 100 records, or the last.