sql - java select large table and export to file -


i have table 62,000,000 rows aprox, need select data these export .txt or .csv

my query limit result 60,000 rows aprox.

when run query in developer machine, eat memory , java.lang.outofmemoryerror

in moment use hibernate dao, can change pure jdbc solution when recommend

my pseoudo-code is

list<map> list = mydao.getmydata(params param); //program crash here  initfile(); for(map map : list){     util.append(map); //this transform row file } closefile(); 

suggesting me write file?

note: use .setresulttransformer(transformers.alias_to_entity_map); map instead of entity

lock table , perform subset selection , exports, appending results file. ensure unconditionally unlock when done. not nice, task perform completion on limited resource servers or clients.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -