Re: ORM Pros/Cons

From: Chris Saxon <chris.saxon_at_gmail.com>
Date: Tue, 17 Mar 2015 12:36:39 +0000
Message-ID: <CAJ7OfbMJC6VVQb42u-TNyTWMqOcX-YAVs3==866rz7O-GQSLNA_at_mail.gmail.com>



To add to Stéphane's point, one of the big cons of ORMs is few people actually know or understand what SQL they will generate on your behalf.

Years back I worked on a system that was hitting concurrency "mutex x" waits when calling the (undocumented) DBMS_PICKLER package. Occasionally this would degrade performance to such an extent that the application was unusable until the database was restarted.

No one could figure out where the call to DBMS_PICKLER was coming from. In the end the issue was fixed by upgrading (from 11.1 to 11.2).

It was only recently, after we installed an application performance management tool that traced the Java code, that we identified the calls were generated by Hibernate!

On 17 March 2015 at 04:41, Stéphane Faroult <sfaroult_at_roughsea.com> wrote:

> If you except the usual stuff (which is that the ORM will execute 5,672
> queries where one would suffice because it only knows simple stuff and
> otherwise relies heavily on "lazy loading"), the big issue I have met is
> performance instability. Several reasons for that, impossibility to
> hardcode values where it would be useful, long (and of a variable number of
> items each time) IN lists with bind variables (keys - lazy loading in
> action), and so forth. I have seen DBAs resorting to adding SQL profile
> over SQL profile. Where things become fun is that when (it was with
> Hibernate) developers tried to improve mapping files, cleaning them up a
> bit and making them more readable, Hibernate started generating different
> aliases, and therefore queries with different signatures, thus invalidating
> all the profiles previously created. Isn't it fun.
>
> Stéphane Faroult
>
>
> On 16/03/15 10:00, stephen van linge (Redacted sender swvanlinge_at_yahoo.com
> for DMARC) wrote:
>
> I realize "does anyone have an opinion about ORM" is a little silly to
> ask, so instead I ask, from a dba/db developer perspective (so many
> opinions are from the application developer perspective), what pros and
> cons have you all seen with the use of an ORM at the application layer of a
> web app?
>
> Thanks,
>
> Stephen
>
>
>

-- 
Thanks,
Chris
www.sqlfail.com
blogs.oracle.com/sql
Twitter: _at_chrisrsaxon

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 17 2015 - 13:36:39 CET

Original text of this message