ThomasMueller a écrit 2 commentaires

  • [^] # Re: Suggestions

    Posté par  . En réponse au journal Petit bench de bases de données embarquées. Évalué à 3.

    In HSQLDB, the data is persisted (to a log file) even in this case. The problem is, the amount of data in the tables is limited by the memory. That means at some point you will run out of memory when using the default mode. When using HSQLDB, opening the database becomes slower and slower the more data is in the database.

    In HSQLDB, the log file is written up to 20 seconds after the commit, see also: http://hsqldb.org/doc/guide/ch09.html#set_write_delay-sectio(...)
    Other databases try to write the log file before the commit returns. I say 'try', because this is not actually working unless you have special hard drives and/or BIOS settings. I have tested this using a 'power off' test. For details, see also: http://www.h2database.com/html/advanced.html#acid
    The H2 database uses a default delay of up to 1 second (this can be changed).
  • # Suggestions

    Posté par  . En réponse au journal Petit bench de bases de données embarquées. Évalué à 4.

    Hi,

    Thanks for sharing the benchmark results! I have some suggestions to improve the test:

    The test should keep and re-use the prepared statements, this would improve the performance for all databases.

    The test is only run once; that's OK if you run it for a long time. If not, I suggest to execute it twice (or to measure the time a little bit after starting it), to given the JVM a chance to compile the classes (JIT).

    To have 'fair' results, the same data should be used for all databases. Using a seed value in the random number generation solves this problem: Random r = new Random(0); and then use r to get 'repeatable' results. Or use r.setSeed to reset the random number generator.

    For HSQLDB, the default mode is used, which is in-memory. That means the table may not fit in the memory if it grows larger (OutOfMemoryException). An easy solution is to use the following database URL: jdbc:hsqldb:test;hsqldb.default_table_type=cached

    I hope this helps,
    Thomas