title: H2 Server consume 1G memory to load a 250m file based database?
body: <p>I got several report from application users of out of memory exception when connecting to a H2 server. When trying to reproduce, I used jconsole to connect to the H2 server and check what's going on. </p>
  
  <p>I found when I connect to the H2 server and load a database the first time, H2 server start consuming a lot of memory. Before loading any database, the H2 server only consume 3M memory. After using Squirrel SQL client connecting to the H2 and load the 250M file database, H2 server consume about 1G memory. What could be the reason this happen?</p>
  
  <p>H2 server start command: 
  java -Xmx2g -Xms16m -XX:PermSize=16m -XX:MaxPermSize=256m -cp "h2-1.3.173.jar;%H2DRIVERS%;%CLASSPATH%" org.h2.tools.Server -tcp -tcpPort 9097 -tcpAllowOthers -baseDir C:\temp\h2db</p>
  
  <p>My connection string: jdbc:h2:tcp://localhost:9097/db1;DB_CLOSE_DELAY=-1</p>
  
  <hr>
  
  <p>Additional information:
  We have quite some tables(1200+) in the database, and 800+ views which union or join on these tables. Will this be the cause of this problem? Could there be any solutions that reduce the memory consumption when loading such database?</p>