-->
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.  [ 7 posts ] 
Author Message
 Post subject: Which database for Hibernate?
PostPosted: Mon Nov 27, 2006 9:48 am 
Newbie

Joined: Mon Nov 27, 2006 9:35 am
Posts: 2
Hi all.
I'm looking for the fastest database (other than MySQL) to use with Hibernate. It has to be free to commercial use.
I have a JSF application which uses Hibernate + Spring and MySQL as an underlying database. It is quite fast and nice but I would like to try another database.
My application's database has about 40 tables and appliaction mostly do select operation on that database. These selects are rather complex - one of them for example has 15 joins and also fetches some of joined tables. It has count() function used also in query. Moreover, this query executes 20 times in a loop.
I have tried HSQL database but this query executes 20 times about 2 minutes, in MySQL it takes only 1,5 second... I used in-memory tables in HSQL (also tried cached tables but these are slower).

The question is: does anyone know database which will be fast as MySQL and will be free?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 10:10 am 
Newbie

Joined: Thu Nov 23, 2006 1:49 am
Posts: 4
Hey
why should not you using Oracle ? if you have environment security and stability!!! and if you application will be running on Linux server then please refer PgSql..good and quick fastest..


JavaAmtho


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 10:10 am 
Regular
Regular

Joined: Sat May 20, 2006 3:49 am
Posts: 78
I have heared that Oracle should be very fast... and there is also a free edition for Windows and Linux available, called Oracle Express.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 12:40 pm 
Senior
Senior

Joined: Mon Oct 23, 2006 5:12 am
Posts: 141
Location: Galicia, Spain
I think this thread is getting somehow OT. Anyway: have you tried to optimize your MySQL tables/queries? I mean, use indexes, table format etc. can get you very distinct results.

I guess what i want to say is: if you want to see how MySQL or HSQL performs don't limit yourself to execute the app and measure the timing, play along with the configuration/optimization possibilities..

_________________
andresgr (--don't forget to rate)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 12:52 pm 
Newbie

Joined: Fri Jul 30, 2004 5:35 am
Posts: 9
Location: Iceland
To make this slightly more on topic: Has anyone done proper benchmarking for different databases running the same Hibernate application? And are there results available somewhere?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 12:57 pm 
Senior
Senior

Joined: Mon Oct 23, 2006 5:12 am
Posts: 141
Location: Galicia, Spain
Hi

http://www.polepos.org/ has some open source benchmarking. I didn't find any "Hibernate" circuit, but the authors talk about Hibernate in the principal page (and not very good i must say...):

"The use of O-R mapping technology like Hibernate or JDO O-R mappers has a strong negative impact on performance. If you can't compensate by throwing hardware at your app, you may have to avoid O-R mappers, if performance is important to you. Protagonists of O-R mapping technology may tell you that caching will bring you back performance. Although this may be true, do not forget: Data that comes from a cache can always be stale in a multi-user application. If you want your data to be up-to-date, you have to reread from the database and an old cache that you can not use will even degrade performance."

I think this statement is very generic and coarse-grained, anyway...

_________________
andresgr (--don't forget to rate)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 1:54 pm 
Newbie

Joined: Mon Nov 27, 2006 9:35 am
Posts: 2
I have indexes in my database. Every foreign key has its own index. Queries are written in Hibernate Criteria mostly, but there are some in HQL. So only way to optimize speed of MySQL is to change settings of the server.

Anyway, I am very satisfied about MySQL results - the only thing why I want to change it to something else is license. Because my application has commercial purpose, I have to buy license for MySQL server. Or maybe I am wrong? It is a www application - does anyone know what about MySQL license in that case?


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

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.