Re: Where is my file?

View: New views
7 Messages — Rating Filter:   Alert me  

Re: Where is my file?

by michael.couck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have an application that has Hsqldb embedded. No worries there. Jpa on top (OpenJPA), all good. And the persistence.xml easy setup. And everything works, perfectly. So what is my problem? Well I can't find the database file. Once the processing is finished I need to move the database file to another directory, then start again. This is the persistence setup:

                <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

                <class>com.ikokoon.instrumentation.model.ABase</class>
                <class>com.ikokoon.instrumentation.model.Class</class>
                <class>com.ikokoon.instrumentation.model.Line</class>
                <class>com.ikokoon.instrumentation.model.Method</class>
                <class>com.ikokoon.instrumentation.model.Package</class>

                <!-- HSQLDB/OpenJpa -->
                <properties>
                        <property name="openjpa.ConnectionURL" value="jdbc:hsqldb:file:./database.db" />
                        <property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
                        <property name="openjpa.ConnectionUserName" value="sa" />
                        <property name="openjpa.ConnectionPassword" value="" />
                        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
                        <property name="openjpa.Log" value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE" />
                        <property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true,PrettyPrintLineLength=150" />

                        <property name="openjpa.RemoteCommitProvider" value="sjvm" />
                        <property name="openjpa.DataCache" value="true(CacheSize=5000, SoftReferenceSize=0)" />
                        <property name="openjpa.QueryCache" value="CacheSize=5000, SoftReferenceSize=0" />
                        <property name="openjpa.RefreshFromDataCache" value="true" />
                </properties>

As you can see the URL is specified as a file, so I should get a file somewhere. I can see the lock file, and the properties file once Hsqldb runs, but no database.db file. Anyone know what the problem is here?

Thanks guys,
Michael

Re: Where is my file?

by Fred Toussi-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If the url is jdbc:hsqldb:file:./database.db, then the database files
are database.db.script, database.db.properties, etc.

You need to shutdown the database to get these files. One option is add
the property shutdown=true to database URL

value="jdbc:hsqldb:file:./database.db;shutdown=true"


On Sat, 03 Oct 2009 23:04 -0700, "michael.couck"
<michaelcouck@...> wrote:

>
> Hi,
>
> I have an application that has Hsqldb embedded. No worries there. Jpa on
> top
> (OpenJPA), all good. And the persistence.xml easy setup. And everything
> works, perfectly. So what is my problem? Well I can't find the database
> file. Once the processing is finished I need to move the database file to
> another directory, then start again. This is the persistence setup:
>
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>
> <class>com.ikokoon.instrumentation.model.ABase</class>
> <class>com.ikokoon.instrumentation.model.Class</class>
> <class>com.ikokoon.instrumentation.model.Line</class>
> <class>com.ikokoon.instrumentation.model.Method</class>
> <class>com.ikokoon.instrumentation.model.Package</class>
>
> <!-- HSQLDB/OpenJpa -->
> <properties>
> <property name="openjpa.ConnectionURL"
> value="jdbc:hsqldb:file:./database.db" />
> <property name="openjpa.ConnectionDriverName"
> value="org.hsqldb.jdbcDriver" />
> <property name="openjpa.ConnectionUserName" value="sa" />
> <property name="openjpa.ConnectionPassword" value="" />
> <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
> <property name="openjpa.Log"
> value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE"
> />
> <property name="openjpa.ConnectionFactoryProperties"
> value="PrettyPrint=true,PrettyPrintLineLength=150" />
>
> <property name="openjpa.RemoteCommitProvider" value="sjvm" />
> <property name="openjpa.DataCache" value="true(CacheSize=5000,
> SoftReferenceSize=0)" />
> <property name="openjpa.QueryCache" value="CacheSize=5000,
> SoftReferenceSize=0" />
> <property name="openjpa.RefreshFromDataCache" value="true" />
> </properties>
>
> As you can see the URL is specified as a file, so I should get a file
> somewhere. I can see the lock file, and the properties file once Hsqldb
> runs, but no database.db file. Anyone know what the problem is here?
>
> Thanks guys,
> Michael
> --
> View this message in context:
> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25734857.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Where is my file?

by michael.couck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Fred,

Thanks for that! Indeed I found the files, silly me. However I still can't use a relational database. My application first used XML(a dom in memory), which is human readable(the purpose), which worked fine but there was too much data and the server ran out of memory after 5 runs.

Then I tried an object database, but I couldn't find it in any Maven repo and I don't want to maintain my own repo(too lazy).

So I tried JPA(OpenJPA) on DB2 which was hopelessly too slow. I tuned OpenJpa as much as possible, tuned the data model, wrote a third level cache(tricky), changed to Hsqldb, perhaps a little faster in memory. No luck. My cache worked well finally, but the actual persistance was just not fast enough. I have around 1 000 000 objects that are related that need to be persisted, and at +- 10 objects per second that would take days.

So finally I am back to the object database(Db4o) which gets about 5000 selects a second and about 1000 inserts a second.

What a pain I tell you. Of course everyone would be happier with the Jpa on Hsqldb, no one trusts object databases(myself excluded of course), but what to do?

Regards,
Michael



Fred Toussi-2 wrote:
If the url is jdbc:hsqldb:file:./database.db, then the database files
are database.db.script, database.db.properties, etc.

You need to shutdown the database to get these files. One option is add
the property shutdown=true to database URL

value="jdbc:hsqldb:file:./database.db;shutdown=true"


On Sat, 03 Oct 2009 23:04 -0700, "michael.couck"
<michaelcouck@hotmail.com> wrote:
>
> Hi,
>
> I have an application that has Hsqldb embedded. No worries there. Jpa on
> top
> (OpenJPA), all good. And the persistence.xml easy setup. And everything
> works, perfectly. So what is my problem? Well I can't find the database
> file. Once the processing is finished I need to move the database file to
> another directory, then start again. This is the persistence setup:
>
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>
> <class>com.ikokoon.instrumentation.model.ABase</class>
> <class>com.ikokoon.instrumentation.model.Class</class>
> <class>com.ikokoon.instrumentation.model.Line</class>
> <class>com.ikokoon.instrumentation.model.Method</class>
> <class>com.ikokoon.instrumentation.model.Package</class>
>
> <!-- HSQLDB/OpenJpa -->
> <properties>
> <property name="openjpa.ConnectionURL"
> value="jdbc:hsqldb:file:./database.db" />
> <property name="openjpa.ConnectionDriverName"
> value="org.hsqldb.jdbcDriver" />
> <property name="openjpa.ConnectionUserName" value="sa" />
> <property name="openjpa.ConnectionPassword" value="" />
> <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
> <property name="openjpa.Log"
> value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE"
> />
> <property name="openjpa.ConnectionFactoryProperties"
> value="PrettyPrint=true,PrettyPrintLineLength=150" />
>
> <property name="openjpa.RemoteCommitProvider" value="sjvm" />
> <property name="openjpa.DataCache" value="true(CacheSize=5000,
> SoftReferenceSize=0)" />
> <property name="openjpa.QueryCache" value="CacheSize=5000,
> SoftReferenceSize=0" />
> <property name="openjpa.RefreshFromDataCache" value="true" />
> </properties>
>
> As you can see the URL is specified as a file, so I should get a file
> somewhere. I can see the lock file, and the properties file once Hsqldb
> runs, but no database.db file. Anyone know what the problem is here?
>
> Thanks guys,
> Michael
> --
> View this message in context:
> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25734857.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Where is my file?

by Fred Toussi-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you write your own mapping to save objects in HSQLDB, you should get
similar or better results than 5000 selects and almost certainly a lot more
inserts.

One way is to use an OR mapper then tweak the definition with indexes.

Fred
----- Original Message -----
From: "michael.couck" <michaelcouck@...>
To: <hsqldb-user@...>
Sent: 08 October 2009 07:34
Subject: Re: [Hsqldb-user] Where is my file?



Hi Fred,

Thanks for that! Indeed I found the files, silly me. However I still can't
use a relational database. My application first used XML(a dom in memory),
which is human readable(the purpose), which worked fine but there was too
much data and the server ran out of memory after 5 runs.

Then I tried an object database, but I couldn't find it in any Maven repo
and I don't want to maintain my own repo(too lazy).

So I tried JPA(OpenJPA) on DB2 which was hopelessly too slow. I tuned
OpenJpa as much as possible, tuned the data model, wrote a third level
cache(tricky), changed to Hsqldb, perhaps a little faster in memory. No
luck. My cache worked well finally, but the actual persistance was just not
fast enough. I have around 1 000 000 objects that are related that need to
be persisted, and at +- 10 objects per second that would take days.

So finally I am back to the object database(Db4o) which gets about 5000
selects a second and about 1000 inserts a second.

What a pain I tell you. Of course everyone would be happier with the Jpa on
Hsqldb, no one trusts object databases(myself excluded of course), but what
to do?

Regards,
Michael




Fred Toussi-2 wrote:

>
> If the url is jdbc:hsqldb:file:./database.db, then the database files
> are database.db.script, database.db.properties, etc.
>
> You need to shutdown the database to get these files. One option is add
> the property shutdown=true to database URL
>
> value="jdbc:hsqldb:file:./database.db;shutdown=true"
>
>
> On Sat, 03 Oct 2009 23:04 -0700, "michael.couck"
> <michaelcouck@...> wrote:
>>
>> Hi,
>>
>> I have an application that has Hsqldb embedded. No worries there. Jpa on
>> top
>> (OpenJPA), all good. And the persistence.xml easy setup. And everything
>> works, perfectly. So what is my problem? Well I can't find the database
>> file. Once the processing is finished I need to move the database file to
>> another directory, then start again. This is the persistence setup:
>>
>>
>> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>
>> <class>com.ikokoon.instrumentation.model.ABase</class>
>> <class>com.ikokoon.instrumentation.model.Class</class>
>> <class>com.ikokoon.instrumentation.model.Line</class>
>> <class>com.ikokoon.instrumentation.model.Method</class>
>> <class>com.ikokoon.instrumentation.model.Package</class>
>>
>> <!-- HSQLDB/OpenJpa -->
>> <properties>
>> <property name="openjpa.ConnectionURL"
>> value="jdbc:hsqldb:file:./database.db" />
>> <property name="openjpa.ConnectionDriverName"
>> value="org.hsqldb.jdbcDriver" />
>> <property name="openjpa.ConnectionUserName" value="sa" />
>> <property name="openjpa.ConnectionPassword" value="" />
>> <property name="openjpa.jdbc.SynchronizeMappings"
>> value="buildSchema(ForeignKeys=true)" />
>> <property name="openjpa.Log"
>> value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE"
>> />
>> <property name="openjpa.ConnectionFactoryProperties"
>> value="PrettyPrint=true,PrettyPrintLineLength=150" />
>>
>> <property name="openjpa.RemoteCommitProvider" value="sjvm" />
>> <property name="openjpa.DataCache" value="true(CacheSize=5000,
>> SoftReferenceSize=0)" />
>> <property name="openjpa.QueryCache" value="CacheSize=5000,
>> SoftReferenceSize=0" />
>> <property name="openjpa.RefreshFromDataCache" value="true" />
>> </properties>
>>
>> As you can see the URL is specified as a file, so I should get a file
>> somewhere. I can see the lock file, and the properties file once Hsqldb
>> runs, but no database.db file. Anyone know what the problem is here?
>>
>> Thanks guys,
>> Michael
>> --
>> View this message in context:
>> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25734857.html
>> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Hsqldb-user mailing list
>> Hsqldb-user@...
>> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>

--
View this message in context:
http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25799115.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Where is my file?

by michael.couck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Fred,

Excuse my ignorance but what do you mean an OR mapper? A tool that optimizes the mapping relationships, or generates better SQL? Somthing that enhances the classes for better performance?

And tweak the indexes? Could you give me a small example please. I would be most appreciative.

Regards,
Michael



Fred Toussi-2 wrote:
If you write your own mapping to save objects in HSQLDB, you should get
similar or better results than 5000 selects and almost certainly a lot more
inserts.

One way is to use an OR mapper then tweak the definition with indexes.

Fred
----- Original Message -----
From: "michael.couck" <michaelcouck@hotmail.com>
To: <hsqldb-user@lists.sourceforge.net>
Sent: 08 October 2009 07:34
Subject: Re: [Hsqldb-user] Where is my file?



Hi Fred,

Thanks for that! Indeed I found the files, silly me. However I still can't
use a relational database. My application first used XML(a dom in memory),
which is human readable(the purpose), which worked fine but there was too
much data and the server ran out of memory after 5 runs.

Then I tried an object database, but I couldn't find it in any Maven repo
and I don't want to maintain my own repo(too lazy).

So I tried JPA(OpenJPA) on DB2 which was hopelessly too slow. I tuned
OpenJpa as much as possible, tuned the data model, wrote a third level
cache(tricky), changed to Hsqldb, perhaps a little faster in memory. No
luck. My cache worked well finally, but the actual persistance was just not
fast enough. I have around 1 000 000 objects that are related that need to
be persisted, and at +- 10 objects per second that would take days.

So finally I am back to the object database(Db4o) which gets about 5000
selects a second and about 1000 inserts a second.

What a pain I tell you. Of course everyone would be happier with the Jpa on
Hsqldb, no one trusts object databases(myself excluded of course), but what
to do?

Regards,
Michael




Fred Toussi-2 wrote:
>
> If the url is jdbc:hsqldb:file:./database.db, then the database files
> are database.db.script, database.db.properties, etc.
>
> You need to shutdown the database to get these files. One option is add
> the property shutdown=true to database URL
>
> value="jdbc:hsqldb:file:./database.db;shutdown=true"
>
>
> On Sat, 03 Oct 2009 23:04 -0700, "michael.couck"
> <michaelcouck@hotmail.com> wrote:
>>
>> Hi,
>>
>> I have an application that has Hsqldb embedded. No worries there. Jpa on
>> top
>> (OpenJPA), all good. And the persistence.xml easy setup. And everything
>> works, perfectly. So what is my problem? Well I can't find the database
>> file. Once the processing is finished I need to move the database file to
>> another directory, then start again. This is the persistence setup:
>>
>>
>> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>
>> <class>com.ikokoon.instrumentation.model.ABase</class>
>> <class>com.ikokoon.instrumentation.model.Class</class>
>> <class>com.ikokoon.instrumentation.model.Line</class>
>> <class>com.ikokoon.instrumentation.model.Method</class>
>> <class>com.ikokoon.instrumentation.model.Package</class>
>>
>> <!-- HSQLDB/OpenJpa -->
>> <properties>
>> <property name="openjpa.ConnectionURL"
>> value="jdbc:hsqldb:file:./database.db" />
>> <property name="openjpa.ConnectionDriverName"
>> value="org.hsqldb.jdbcDriver" />
>> <property name="openjpa.ConnectionUserName" value="sa" />
>> <property name="openjpa.ConnectionPassword" value="" />
>> <property name="openjpa.jdbc.SynchronizeMappings"
>> value="buildSchema(ForeignKeys=true)" />
>> <property name="openjpa.Log"
>> value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE"
>> />
>> <property name="openjpa.ConnectionFactoryProperties"
>> value="PrettyPrint=true,PrettyPrintLineLength=150" />
>>
>> <property name="openjpa.RemoteCommitProvider" value="sjvm" />
>> <property name="openjpa.DataCache" value="true(CacheSize=5000,
>> SoftReferenceSize=0)" />
>> <property name="openjpa.QueryCache" value="CacheSize=5000,
>> SoftReferenceSize=0" />
>> <property name="openjpa.RefreshFromDataCache" value="true" />
>> </properties>
>>
>> As you can see the URL is specified as a file, so I should get a file
>> somewhere. I can see the lock file, and the properties file once Hsqldb
>> runs, but no database.db file. Anyone know what the problem is here?
>>
>> Thanks guys,
>> Michael
>> --
>> View this message in context:
>> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25734857.html
>> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Hsqldb-user mailing list
>> Hsqldb-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>

--
View this message in context:
http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25799115.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Where is my file?

by Fred Toussi-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

Please subsribe to the list with your current email address, so that your
posts do not need admin intervention.

OR in this context means Object Relational. Examples include Hibernate.

I cannot give a concrete example, but all those mappers create tables and
queries to persist and retreive the objects. Sometimes the query speed can
be improved by adding indexes.

If speed is essential, then you are often better off writing at least part
of the persistence / retreival code yourself, using JDBC prepared statements
with custom-made SQL statements.

Fred

----- Original Message -----
From: "michael.couck" <michaelcouck@...>
To: <hsqldb-user@...>
Sent: 09 October 2009 08:54
Subject: Re: [Hsqldb-user] Where is my file?



Hi Fred,

Excuse my ignorance but what do you mean an OR mapper? A tool that optimizes
the mapping relationships, or generates better SQL? Somthing that enhances
the classes for better performance?

And tweak the indexes? Could you give me a small example please. I would be
most appreciative.

Regards,
Michael




Fred Toussi-2 wrote:

>
> If you write your own mapping to save objects in HSQLDB, you should get
> similar or better results than 5000 selects and almost certainly a lot
> more
> inserts.
>
> One way is to use an OR mapper then tweak the definition with indexes.
>
> Fred
> ----- Original Message -----
> From: "michael.couck" <michaelcouck@...>
> To: <hsqldb-user@...>
> Sent: 08 October 2009 07:34
> Subject: Re: [Hsqldb-user] Where is my file?
>
>
>
> Hi Fred,
>
> Thanks for that! Indeed I found the files, silly me. However I still can't
> use a relational database. My application first used XML(a dom in memory),
> which is human readable(the purpose), which worked fine but there was too
> much data and the server ran out of memory after 5 runs.
>
> Then I tried an object database, but I couldn't find it in any Maven repo
> and I don't want to maintain my own repo(too lazy).
>
> So I tried JPA(OpenJPA) on DB2 which was hopelessly too slow. I tuned
> OpenJpa as much as possible, tuned the data model, wrote a third level
> cache(tricky), changed to Hsqldb, perhaps a little faster in memory. No
> luck. My cache worked well finally, but the actual persistance was just
> not
> fast enough. I have around 1 000 000 objects that are related that need to
> be persisted, and at +- 10 objects per second that would take days.
>
> So finally I am back to the object database(Db4o) which gets about 5000
> selects a second and about 1000 inserts a second.
>
> What a pain I tell you. Of course everyone would be happier with the Jpa
> on
> Hsqldb, no one trusts object databases(myself excluded of course), but
> what
> to do?
>
> Regards,
> Michael
>
>
>
>
> Fred Toussi-2 wrote:
>>
>> If the url is jdbc:hsqldb:file:./database.db, then the database files
>> are database.db.script, database.db.properties, etc.
>>
>> You need to shutdown the database to get these files. One option is add
>> the property shutdown=true to database URL
>>
>> value="jdbc:hsqldb:file:./database.db;shutdown=true"
>>
>>
>> On Sat, 03 Oct 2009 23:04 -0700, "michael.couck"
>> <michaelcouck@...> wrote:
>>>
>>> Hi,
>>>
>>> I have an application that has Hsqldb embedded. No worries there. Jpa on
>>> top
>>> (OpenJPA), all good. And the persistence.xml easy setup. And everything
>>> works, perfectly. So what is my problem? Well I can't find the database
>>> file. Once the processing is finished I need to move the database file
>>> to
>>> another directory, then start again. This is the persistence setup:
>>>
>>>
>>> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>>
>>> <class>com.ikokoon.instrumentation.model.ABase</class>
>>> <class>com.ikokoon.instrumentation.model.Class</class>
>>> <class>com.ikokoon.instrumentation.model.Line</class>
>>> <class>com.ikokoon.instrumentation.model.Method</class>
>>> <class>com.ikokoon.instrumentation.model.Package</class>
>>>
>>> <!-- HSQLDB/OpenJpa -->
>>> <properties>
>>> <property name="openjpa.ConnectionURL"
>>> value="jdbc:hsqldb:file:./database.db" />
>>> <property name="openjpa.ConnectionDriverName"
>>> value="org.hsqldb.jdbcDriver" />
>>> <property name="openjpa.ConnectionUserName" value="sa" />
>>> <property name="openjpa.ConnectionPassword" value="" />
>>> <property name="openjpa.jdbc.SynchronizeMappings"
>>> value="buildSchema(ForeignKeys=true)" />
>>> <property name="openjpa.Log"
>>> value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE"
>>> />
>>> <property name="openjpa.ConnectionFactoryProperties"
>>> value="PrettyPrint=true,PrettyPrintLineLength=150" />
>>>
>>> <property name="openjpa.RemoteCommitProvider" value="sjvm" />
>>> <property name="openjpa.DataCache" value="true(CacheSize=5000,
>>> SoftReferenceSize=0)" />
>>> <property name="openjpa.QueryCache" value="CacheSize=5000,
>>> SoftReferenceSize=0" />
>>> <property name="openjpa.RefreshFromDataCache" value="true" />
>>> </properties>
>>>
>>> As you can see the URL is specified as a file, so I should get a file
>>> somewhere. I can see the lock file, and the properties file once Hsqldb
>>> runs, but no database.db file. Anyone know what the problem is here?
>>>
>>> Thanks guys,
>>> Michael
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25734857.html
>>> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and
>>> stay
>>> ahead of the curve. Join us from November 9-12, 2009. Register
>>> now!
>>> http://p.sf.net/sfu/devconf
>>> _______________________________________________
>>> Hsqldb-user mailing list
>>> Hsqldb-user@...
>>> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Hsqldb-user mailing list
>> Hsqldb-user@...
>> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25799115.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>

--
View this message in context:
http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25816912.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Where is my file?

by michael.couck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Fred,

Thanks, I did subscribe.

Got it, the OR mapping library like Toplink, Hibernate and what I am using OpenJpa. I have indexes and foreign keys on all the fields that I can afford. Of course where there are indexes on 1 000 000 objects that are related, whenever there is an insert the indexes need to be updated, this increases the insert time way beyond tolerable levels.

I thought that you had some ace up your sleeve that I missed, some magic SQL generating super mapping library that will improve performance 1000 times!

Writing my own or mapping with SQL would indeed be more performant, but I really want to avoid that.

So I am back to OODB.

Thanks for your help guys.

Regards,
Michael


fredt wrote:
Hi Michael,

Please subsribe to the list with your current email address, so that your
posts do not need admin intervention.

OR in this context means Object Relational. Examples include Hibernate.

I cannot give a concrete example, but all those mappers create tables and
queries to persist and retreive the objects. Sometimes the query speed can
be improved by adding indexes.

If speed is essential, then you are often better off writing at least part
of the persistence / retreival code yourself, using JDBC prepared statements
with custom-made SQL statements.

Fred

----- Original Message -----
From: "michael.couck" <michaelcouck@hotmail.com>
To: <hsqldb-user@lists.sourceforge.net>
Sent: 09 October 2009 08:54
Subject: Re: [Hsqldb-user] Where is my file?



Hi Fred,

Excuse my ignorance but what do you mean an OR mapper? A tool that optimizes
the mapping relationships, or generates better SQL? Somthing that enhances
the classes for better performance?

And tweak the indexes? Could you give me a small example please. I would be
most appreciative.

Regards,
Michael




Fred Toussi-2 wrote:
>
> If you write your own mapping to save objects in HSQLDB, you should get
> similar or better results than 5000 selects and almost certainly a lot
> more
> inserts.
>
> One way is to use an OR mapper then tweak the definition with indexes.
>
> Fred
> ----- Original Message -----
> From: "michael.couck" <michaelcouck@hotmail.com>
> To: <hsqldb-user@lists.sourceforge.net>
> Sent: 08 October 2009 07:34
> Subject: Re: [Hsqldb-user] Where is my file?
>
>
>
> Hi Fred,
>
> Thanks for that! Indeed I found the files, silly me. However I still can't
> use a relational database. My application first used XML(a dom in memory),
> which is human readable(the purpose), which worked fine but there was too
> much data and the server ran out of memory after 5 runs.
>
> Then I tried an object database, but I couldn't find it in any Maven repo
> and I don't want to maintain my own repo(too lazy).
>
> So I tried JPA(OpenJPA) on DB2 which was hopelessly too slow. I tuned
> OpenJpa as much as possible, tuned the data model, wrote a third level
> cache(tricky), changed to Hsqldb, perhaps a little faster in memory. No
> luck. My cache worked well finally, but the actual persistance was just
> not
> fast enough. I have around 1 000 000 objects that are related that need to
> be persisted, and at +- 10 objects per second that would take days.
>
> So finally I am back to the object database(Db4o) which gets about 5000
> selects a second and about 1000 inserts a second.
>
> What a pain I tell you. Of course everyone would be happier with the Jpa
> on
> Hsqldb, no one trusts object databases(myself excluded of course), but
> what
> to do?
>
> Regards,
> Michael
>
>
>
>
> Fred Toussi-2 wrote:
>>
>> If the url is jdbc:hsqldb:file:./database.db, then the database files
>> are database.db.script, database.db.properties, etc.
>>
>> You need to shutdown the database to get these files. One option is add
>> the property shutdown=true to database URL
>>
>> value="jdbc:hsqldb:file:./database.db;shutdown=true"
>>
>>
>> On Sat, 03 Oct 2009 23:04 -0700, "michael.couck"
>> <michaelcouck@hotmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I have an application that has Hsqldb embedded. No worries there. Jpa on
>>> top
>>> (OpenJPA), all good. And the persistence.xml easy setup. And everything
>>> works, perfectly. So what is my problem? Well I can't find the database
>>> file. Once the processing is finished I need to move the database file
>>> to
>>> another directory, then start again. This is the persistence setup:
>>>
>>>
>>> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>>
>>> <class>com.ikokoon.instrumentation.model.ABase</class>
>>> <class>com.ikokoon.instrumentation.model.Class</class>
>>> <class>com.ikokoon.instrumentation.model.Line</class>
>>> <class>com.ikokoon.instrumentation.model.Method</class>
>>> <class>com.ikokoon.instrumentation.model.Package</class>
>>>
>>> <!-- HSQLDB/OpenJpa -->
>>> <properties>
>>> <property name="openjpa.ConnectionURL"
>>> value="jdbc:hsqldb:file:./database.db" />
>>> <property name="openjpa.ConnectionDriverName"
>>> value="org.hsqldb.jdbcDriver" />
>>> <property name="openjpa.ConnectionUserName" value="sa" />
>>> <property name="openjpa.ConnectionPassword" value="" />
>>> <property name="openjpa.jdbc.SynchronizeMappings"
>>> value="buildSchema(ForeignKeys=true)" />
>>> <property name="openjpa.Log"
>>> value="DefaultLevel=INFO,SQL=INFO,File=./openjpa.log,Runtime=INFO,Tool=INFO,SQL=TRACE"
>>> />
>>> <property name="openjpa.ConnectionFactoryProperties"
>>> value="PrettyPrint=true,PrettyPrintLineLength=150" />
>>>
>>> <property name="openjpa.RemoteCommitProvider" value="sjvm" />
>>> <property name="openjpa.DataCache" value="true(CacheSize=5000,
>>> SoftReferenceSize=0)" />
>>> <property name="openjpa.QueryCache" value="CacheSize=5000,
>>> SoftReferenceSize=0" />
>>> <property name="openjpa.RefreshFromDataCache" value="true" />
>>> </properties>
>>>
>>> As you can see the URL is specified as a file, so I should get a file
>>> somewhere. I can see the lock file, and the properties file once Hsqldb
>>> runs, but no database.db file. Anyone know what the problem is here?
>>>
>>> Thanks guys,
>>> Michael
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25734857.html
>>> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and
>>> stay
>>> ahead of the curve. Join us from November 9-12, 2009. Register
>>> now!
>>> http://p.sf.net/sfu/devconf
>>> _______________________________________________
>>> Hsqldb-user mailing list
>>> Hsqldb-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Hsqldb-user mailing list
>> Hsqldb-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25799115.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>

--
View this message in context:
http://www.nabble.com/Re%3A-Where-is-my-file--tp25734857p25816912.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user