Hi, Startup is normally very fast. It it takes 5-6 seconds, it sounds like something is wrong. Could you get some profiling data, as described in http://h2database.com/html/performance.html#built_in_profiler ?
Regards, Thomas On Wed, Aug 8, 2012 at 11:35 AM, Harish Alwala <[email protected]>wrote: > Hi All > I have a problem establishing connection to H2 database when the size of > the db file is over 100 mb. > I have written a Swing Application and I am using H2 database in embeded > mode. Application works(connection establishment & query process) fine when > the size of the db file is around 10-50 mb. When the file size increases to > 100 mb the application slows down. > Observation: > 1. connection > =java.sql.DriverManager.getConnection(getConnectionUrl(),username, > password); > Above statement takes 5-6 seconds to get the connection. > 2. CPU shoots up to 60% while fetching the connection. > 3. working with database my application always shows around 500mb in > jconsole. > > What I have done: > I have replaced above statement with > connectionPool = JdbcConnectionPool.create(getConnectionUrl(), username, > password); > connectionPool.setMaxConnections(200); > Still I dont see any difference. > > I have tried same replacing H2 Database with SQLServer Database. > Very interestingly application takes hardly any memory (max 100mb) and cpu > shows 30 % while continues db operation. > > Regarding memory I feel since I am embeding the H2 database with in my > application, the memory used by H2 db + CPU used by H2 db is also shown in > my application . > > Please let me know if there is any work around. > > > > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/h2-database/-/dsjzxuG6gvoJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
