for opening the connection I use:
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:/mydir/myapp/mydb",
"sa", "");
Should I remove the SHUTDOWN command sent to H2?
Thanks for your help
Best regards,
Sylvain
On Tue, Dec 8, 2009 at 8:25 AM, Mikkel Kamstrup Erlandsen <
[email protected]> wrote:
> 2009/12/7 Sylvain Pointeau <[email protected]>:
> > Hi,
> > I did what you suggest, opening it with the shell and then "quit" to
> > properly close the DB.
> > yes it goes faster to open it after that but still it uses 8 seconds.
> > Is this time linear with the db size?
> > I put 1GB to the java process.
> > the other thing is that I used:
> > StatementUtils.execute( conn, "SHUTDOWN");
> > conn.close();
> > for closing the connection,
> > is it bad?
>
> I simply close the JDBC connection. AFAIK H2 has a shutdown hook in
> the JVM to properly clean up.
>
> On my 22GB database I still only see a few seconds worth of startup?
> What JDBC URL are you opening the DB with?
>
> --
> Cheers,
> Mikkel
>
> --
>
> 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]<h2-database%[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.