I have two persistent entities mapped to two different tables. In my objectial model I do not hold any connection between then (one to one or many to one or many to many).
I have a simple query that retrieves records from one of the tables but with implicit join between the two tables, for example:
select entity from tests.Entity as entity ,tests.Second as second where entity.code=second.code
When I run this query in native SQL with a standarsd oracel client I get results in 0.4 seconds. When I run this query with hibernate I get the same results in 3 seconds.
What is the reason for this kind of diffrentiality?
P.S. I run tests like this more then once for other cases as complex as the above and for more complex cases and I always get a huge difference in performance.
|