-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: .data file much larger than it needs to be?
PostPosted: Fri May 25, 2007 11:01 am 
Newbie

Joined: Fri May 25, 2007 10:30 am
Posts: 1
So, I have 2 classes that I am persisting in a file.

Code:
AnnotationConfiguration config = new AnnotationConfiguration();
config.setProperty("hibernate.dialect", org.hibernate.dialect.HSQLDialect").
   setProperty("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver");

config.setProperty("hibernate.connection.url", "jdbc:hsqldb:file:userdb;hsqldb.shutdown=true;hsqldb.default_table_type=cached")
   .setProperty("hibernate.show_sql", "false")
        .setProperty("shutdown", "true")
   .setProperty("hibernate.hbm2ddl.auto", "update");

HibernateUtil.setSessionFactory(config.buildSessionFactory());


I have around 17Kb of actual data in the database [excluding overhead of serializing things and the hashmap classes,etc], but the storagedb.data is 128Mb. Now, I can remove the database, re enter all the same data and it is a much more reasonable size (a few meg, max). It seems that the .data just keeps growing. Does it seem like I am missing something obvious here? I'm not doing a 'shutdown compact' or anything else when I 'close' the database, would something along those lines be needed?

I am using Hibernate 3.2.2.ga, with Hibernate-Annotations 3.2.1.ga.
The database structure is pretty simple, one user has many objects. Inside an object, there is a serialized hashmap storing that object's options (a simple <string,string>). All other attributes are simple data types (string, int,etc).

Any insight or direction is welcome, I'm more than fine with a response along the lines 'go search about <x>', or a nice "RTFM" if I missed something.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.