views:

44

answers:

2

hi!

I have an "select * from tables..joins..." query on an oracle database, wich would return about 22 milions rows. I'm using C# and ODP.NET , like so : oracleDataReader odr = command.ExecuteReader(); But during execution of this statement, the process takes about 1,5 Gb RAM, wich is not very good. Any ideea on how to save some memory ? Thanks!

+1  A: 

First off all try to add some where clauses in the query if it's possibl to minimize the amount of results. Are you sure you need all 22milions results at once?

then you can change select * from.... into select columnA, columnB from... that would also save some memory, since select *... returns data from all the columns, all tables you used in that query. That might be not effiecient. greetings:)

Katalonis
A: 

Oracle must support such expression: SELECT * from Table WHERE ROWNUM <= 10

zabulus