2 Replies Latest reply on Jul 12, 2003 6:20 PM by drej

    [newbie] Make Hypersonic write data to disk (default is in-m

    drej

      Hello,

      OS: Solaris ver. 8
      JBOSS: 3.2.0

      During my research I noticed that Hypersonic stores all data in memory by default, which IMHO is no good in a production environment. What if there is a h/w failure, or just a crash...all my data is lost? From what I understand, as you write to the DB, Hypersonic saves the data in a script file, but this gets very large, especially if storing bitblobs in the DB.

      From reading the Hypersonic docs, there is a connection url to enable disk-based storage, so I edited my server/default/deploy/hsqldb-ds.xml file to enable it as follows:

      connection-url>jdbc:hsqldb:hsql:.</connection-url>

      became

      connection-url>jdbc:hsqldb:hsql:/db/mydata</connection-url>

      When I do this and restart the server, Hypersonic seems to act the same. After adding a few small (4x15KB) pictures to the database, my mydata.script file becomes 11MB because it's all plain text! My mydata.data file, which I assume should hold the compressed binary data is 0KB.

      From the Hypersonic docs, it seems that if you wish to force disk-based used, your CREATE TABLE statements must instead be CREATED CACHED TABLE. Can anyone help me out to determine where I can find and change this mapping?

      Thanks!
      Andrej

      P.S. - as a default setting, wouldn't it be better to have hypersonic as disk-based for JBOSS...mebe jes me.

        • 1. Re: [newbie] Make Hypersonic write data to disk (default is

          Hypersonic is there really to get you up and running quickly. It is not recommended for production systems (unless in-memory database is really what you want).

          I would recommend installing PostgreSQL for your production needs.

          • 2. Re: [newbie] Make Hypersonic write data to disk (default is
            drej

            I would have to agree with you that Hypersonic is not very good for production systems. Although according to their website, they believe it can be :) But even for getting started, it makes more sense to have a disk-based database since that is what most people would require. I am in the process of connecting MySQL and I hope everything goes smoothly!

            Andrej