Hello,

I think I need to give you more explanation.
In our production environnement, a website page takes 6 minutes to be
displayed. And I think it is not enough quick ;-)
In order to find the performance problem, we added some logs and found that
the following code was the problem (and takes 6 minutes) :

list = broker.getCollectionByQuery(requete);
broker.commitTransaction();

This query returns only 10 records (with simple data, no lob).
I thought it was an Oracle performance problem so with the debug mode, I
found the generated query. This query is not optimised, but when I tried it
on the database, it only takes 4 secondes to be executed.
I'm sure that the mapping is bad but i don't understand such difference
between executing a query directly from a database and with OJB.

So here are my questions :

1) Is the query displayed in the log server (with obj properties
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=DEBUG
) really the query executed on the database by OJB?

2) How really works OJB to retrieve data from a database?


Thanks a lot.

Yannick

-----Message d'origine-----
De�: Yannick Goujon [mailto:[EMAIL PROTECTED] 
Envoy�: mardi 16 mars 2004 14:56
��: [EMAIL PROTECTED]
Objet�: Query Performance

Hi,

 

We use Oracle 8.1.7 and we have performance problem with a query generated
by OJB.

With OJB, it takes 6 minutes (maybe due to a bad mapping).

We found the generated query by changing the LogLevel of the sql generator
(org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=DEBU
G)

When we try this query directly under sqlplus, it only takes 4 secondes!

Can someone explain me why is it so long with OJB? Is it due to a bad
mapping or a bad configuration of OJB?

 

Thanks

 

Yannick



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to