we were testing the capability of our application, here is the scenario, we have a table that holds 5 million record, we want to export it to csv so we successfully made a csv writer class. the main problem is when we export the whole record, we catch OOM exception(out of memory exception), when the data is over a million, what makes it more difficult is the user can choose what columns are to be exported.. is there any way to catch thing up nice and well without a blocking process??? what type of process is best suitable for this scenario??? should i used (and how) to use background process for this??
any point of view (examples) are well appreciated. thanks...