开发者

HSQLDB is eating all my memory

I'm using a HSQLDB for an application that stores research data and there is quite a lot of data. HSQLDB insists on always loading the tables into memory. I've tried fixing this by setting hsqldb.default_table_type=cached in my persistence.xml but that does not work.

Is this the wrong place?

persistence.xml

<persistence-unit name="Dvh DB" transaction-type="RESOURCE_LOCAL">
    <class>com.willcodejavaforfood.dvh.entity.Patient</class>
    <class>com.willcodejavaforfood.dvh.entity.Plan</class>
    <class>com.willcodejavaforfood.dvh.entity.Dvh</class>
    <class>com.willcodejavaforfood.dvh.entity.ImportSession</class>
    <class>com.willcodejavaforfood.dvh.entity.Project</class>
    <class>com.willcodejavaforfood.dvh.开发者_开发技巧entity.Course</class>
    <class>com.willcodejavaforfood.dvh.entity.Property</class>
    <properties>
        <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:./myDvhDb"/>
        <property name="javax.persistence.jdbc.user" value="sa"/>
        <property name="javax.persistence.jdbc.password" value=""/>
        <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
        <property name="hibernate.hbm2ddl.auto" value="create-drop" />
        <property name="hsqldb.default_table_type" value="cached" />
    </properties>
</persistence-unit>

When my HSQLDB database is created I can see in its properties file:

hsqldb.default_table_type=memory

Thanks


Could you try putting the hsqldb.default_table_type=cached in the connection string? Like this: jdbc:hsqldb:./myDvhDb;hsqldb.default_table_type=cached

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜