Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Hibernate and Oracle

Re: Hibernate and Oracle

From: Remigiusz Soko?owski <rems_at_wp-sa.pl>
Date: Mon, 12 Feb 2007 10:02:13 +0100
Message-id: <45D02D15.8070805@wp-sa.pl>


Keith Moore wrote:
>> 10046 trace is your friend when trying to tune hibernate apps.
>>
>
> That was my experience. Also statspack.
>
> When I worked on a project using Hibernate, it generated lots of realy ugly
> queries, often joining 30 or 40 tables. If a web page required data from
> several tables, it would try to get all the data in a single query, even if
> there were many intermediate tables. If it could find a relationship, no
> matter how remote, it was going to use it.
>
> After tracing, I pointed out these monster queries to the developers and
> sometimes they would make changes to the Hibernate configuration and that
> would help. In other cases, there is a way for the developers to override
> Hibernate and manually create the SQL. The developers didn't like doing this,
> except as a last resort.
>
> I'm not a fan of Hibernate, but it is a way for Developers that do not
> understand SQL to write database applications.
>
>
>

Hi!
to the quite useful things there belongs hibernate.show_sql property - it produces in the form of log all sql queries executed on the database. By and large the tuning in my situation relies on earlier proper design and setting cache properties (for example time of loading - eager or lazy) (so as a DBA I 'm a consultant ). From the database point of view the only useful tool are outlines - there is no possibility to add hints - comments are added with spaces (i.e. buf.append("/* ").append(comment).append(" */ ");, so hint provided as a comment won't work).

Regards
Remigusz

-- 
---------------------------------------
Remigiusz Sokolowski <rems_at_wp-sa.pl>
WP/PTI/DIP/ZAB (+04858) 52 15 770
MySQL  v.  4.x
Oracle v. 10.x
---------------------------------------

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 12 2007 - 03:02:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US