-->
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.  [ 11 posts ] 
Author Message
 Post subject: Blob performance faster on postgresql/mysql than oracle
PostPosted: Tue Dec 13, 2005 5:32 am 
Beginner
Beginner

Joined: Tue Jul 12, 2005 11:15 am
Posts: 29
Hibernate version:3.0.5

Name and version of the database you are using:Oracle 9.2.0.6

Hi,

Our application, on same machine is faster
with PostgreSQL 8.1 and MySQL5.0
than Oracle9.2.0.6.

We read database and create a document.
we have tested various configuration
with an oracle's expert and result is the same.

The only difference is the jdbc driver:
ojdbc14.jar (Oracle10g release 2 - 10.2.0.1.0) for oracle
mysql-connector-java-3.1.12-bin.jar for mysql
postgresql-8.1-404.jar for postgresql

has anybody had an explanation?
why postgresql/mysql are faster than oracle?

_________________
Pim.


Top
 Profile  
 
 Post subject: Re: Blob performance faster on postgresql/mysql than oracle
PostPosted: Tue Dec 13, 2005 6:03 am 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
pimento wrote:
has anybody had an explanation?
why postgresql/mysql are faster than oracle?


It is hard to guess without seeing your code, your mapping and the sql that was executed against the database? You don't say if you executed the test several times either, or provide details of your schema(s)?

Even then, some databases are faster than others. Even if oracle costs an arm and a leg it might be slower than competitors for stuff like this.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 7:13 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
i don't agree - do you test with more users ?

if no, then you can user flat files and it is quicker than every databases

it is possible that any databases is quicker in single-user environment, but in mutliuser concurent environment oracle is the best - it is simple because oracle have superior locking mechanism - read locking architecture for oracle and any database and you see this or try
with more users with more table queries


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 8:22 am 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
snpesnpe wrote:
i don't agree - do you test with more users ?

if no, then you can user flat files and it is quicker than every databases


What I said was that mysql/postgres may be faster than oracle in limited use scenarios.

You answered that oracle is faster on average, especially when you have concurrent accesses.

I don't see that we disagree here.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 9:11 am 
Beginner
Beginner

Joined: Tue Jul 12, 2005 11:15 am
Posts: 29
No, we test only with one user but it's not a reason to not use a database.
We need to use a database because with manage version and later we will be multi-user.

You think, it's just the superiority of the locking mechanism, maybe you are right.

I was thinking, it's due to the implementation of the jdbc driver processing
blob or clob in the ojdbc14.jar.

Any other explanation???


Pim.
_________________
PS:
Our mapping is essentialy a byte array (blob) or a string (clob), and we essentially process SELECT request.
_________________
byte array Mapping:

<property
name="content"
type="byte[]"
update="true"
insert="true"
access="property"
column="ELEMENT_CONTENT"
/>
_________________

or string Mapping:

<property
name="content"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="ELEMENT_CONTENT"
/>

_________________


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 11:18 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
I don't sure for jdbc driver - it can be what you claim and oracle's java stuff isn't too good

however, locking is important - when you test application with small number of users and queries/dml then you will have good performance, but when you deploy application you will have worst performance

oracle have rollback version for every query - have doubled data - it mean that with one user it is slower, but later reader don't block another readers and writers and writer don't block another writers/reader (except if another writer write to same row)
this behavior mean superior performance in multiuser no matter what are data
it is > 10 and more times quicker in multiuser - blocking users have horribel impact on performance

postgresql have similar architecture, but postgresql lock foreign key constraints and if you test in multiuser without referencial integrity then it work fine, but if you have correct defined database with referencial integrity then performace is worst than oracle

on this list exists more thread about performance jdbc and hibernate - hibernate is slower (for simple query) because hibernate do much more than jdbc - populate bean, collection, cache etc

true test is in multiuser environment, only - if you use database with only one user then

Quote:
You answered that oracle is faster on average, especially when you have concurrent accesses.

I don't see that we disagree here.

if you use database in single user/single query then i agree, but it is rear cases

I forget - it isn't in only multiuser - this is true for single user when user do more queries/dml to same date

Quote:
Even then, some databases are faster than others. Even if oracle costs an arm and a leg it might be slower than competitors for stuff like this.


there is now free oracle database (oracle 10g express , 1 gb ram 4 gb data constraints)
4 gb in oracle data is big - oracle save space good and you will not easy break this constraint


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 11:24 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
and one question

what mean slower - is it slower more times or what ... ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 12:03 pm 
Beginner
Beginner

Joined: Tue Jul 12, 2005 11:15 am
Posts: 29
We made 21606 SELECTs with a global data size of 192Mo.

Postgresql: 70s
Oracle:95s

Oracle is 27 % slower.

_________________
Pim.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 1:40 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Quote:
We made 21606 SELECTs with a global data size of 192Mo.

Postgresql: 70s
Oracle:95s

Oracle is 27 % slower.


maybe that this is jdbc driver, but this isn't horrible values and it is expected for me.
Postgresql have similar architecture (MVC) and it work good in multiuser, too, but oracle is better when you have more referencial constraints

there are thread on this forum when one test with MS SQL Server - one query/one user is quicker with MS Sql for any percent, but when multiple queries (with only one user, but order queries is random) then oracle is quicker 30 times (it is 3000%)

oracle's licence denied testing and they are correct - testing databases isn't easy job


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 9:51 am 
Beginner
Beginner

Joined: Tue Jul 12, 2005 11:15 am
Posts: 29
No other remarks or ideas?
How can be sure it's not a jdbc driver problem?

_________________
Pim.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 10:58 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
what is a problem ?
27% quicker or slower for one query ? it isn't problem ?
if you want you can use profiler or debuger, but it isn't important
test for database is important only in multi-(users/queries) environment)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 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.