Re: Hibernate and Oracle

  • From: Remigiusz Soko?owski <rems@xxxxxxxx>
  • Date: Mon, 12 Feb 2007 10:02:13 +0100

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@xxxxxxxx>
WP/PTI/DIP/ZAB (+04858) 52 15 770
MySQL  v.  4.x
Oracle v. 10.x
---------------------------------------

--
//www.freelists.org/webpage/oracle-l


Other related posts: