title: H2 database Load csv data faster
body: <p>I want to load about 2 million rows from CSV formatted file to database and run some SQL statement for analysis, and then remove the data. File size is 2GB in size. Data is web server log message. 
  Did some research and found H2 in-memory database seems to be faster, since its keep the data in memory.   When I try to load the data got OutOfMemory error message because of 32 bit java.  Planning to try with 64 bit java.</p>
  
  <p>I am looking for all the optimization option to load the quickly and run the SQL. </p>
  
  <p>test.sql</p>
  
  <pre><code>CREATE TABLE temptable (
    f1 varchar(250) NOT NULL DEFAULT '',
    f2 varchar(250) NOT NULL DEFAULT '',
    f3 reponsetime NOT NULL DEFAULT ''
    ) as select * from CSVREAD('log.csv');
  </code></pre>
  
  <p>Running like this in 64 bit java:</p>
  
  <pre><code>java -Xms256m -Xmx4096m -cp h2*.jar org.h2.tools.RunScript -url 'jdbc:h2:mem:test;LOG=0;CACHE_SIZE=65536;LOCK_MODE=0;UNDO_LOG=0' -script  test.sql
  </code></pre>
  
  <p>If any other database available to use in AIX please let me know.</p>
  
  <p>thanks</p>