Hi,

> Does H2 provide the option to try it out?

Yes, H2 provides that :-) Actually, no, but it's quite easy to test it yourself.

    for (int j = 0; j < 3; j++) {
        long start = System.currentTimeMillis();
        int count = 100000;
        for (int i = 0; i < count; i++) {
            PreparedStatement prep =
                conn.prepareStatement("select " + i + " from test");
            prep.close();
        }
        System.out.println("parsed " + count + " statements in "
                + (System.currentTimeMillis() - start) / 1000.0 + " seconds");
    }

H2:
parsed 100000 statements in 0.488 seconds

HSQLDB:
parsed 100000 statements in 1.367 seconds

Derby:
parsed 100000 statements in 221.8 seconds (actually this is an
extrapolation with count=1000)

So for H2 and HSQLDB parsing and preparing SQL statements is quite
fast. But you still should use prepared statements. For Derby, it is
very important to use prepared statements, because the overhead is
big.

Regards,
Thomas

-- 
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.

Reply via email to