Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx28.iad.POSTED!not-for-mail From: Arved Sandstrom User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: ORMs comparisons/complaints. References: <%JGtu.29103$Wm1.26832@fx17.iad> <52c4d306$0$302$14726298@news.sunsite.dk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 31 Message-ID: X-Complaints-To: abuse@newsgroups-download.com NNTP-Posting-Date: Mon, 06 Jan 2014 03:44:22 UTC Organization: Public Usenet Newsgroup Access Date: Sun, 05 Jan 2014 23:44:21 -0400 X-Received-Bytes: 2578 X-Received-Body-CRC: 1175628416 Xref: csiph.com comp.lang.java.programmer:27246 On 01/03/2014 06:30 PM, Martin Gregorie wrote: > On Fri, 03 Jan 2014 16:04:40 -0400, Arved Sandstrom wrote: > >> Martin, the SQL generated by Java ORMs is not hidden. Suitable logging >> levels expose the generated SQL. If you distrust that logging there are >> always DB profilers. Many/most ORMs are open source: when in doubt, >> investigate the code...I've tweaked several Java ORMs after code >> inspection. >> > I'd assumed that the ORM would be generating SQL, so its good to know > that what it generates can be inspected. Not that I'm casting nasturtiums > at ORMS, but I've seen some truly dreadful automatically generated SQL in > the past (Sybase PowerBuilder, I'm looking at you), so I tend to be > suspicious of auto-generated SQL. > > However, I was wondering whether there any performance problems could > come from the way an ORM uses its generated SQL and what tools might be > available to analyse them. [ SNIP ] Martin, I'd be generally inclined to tackle the possible performance problem by using ORM logging first, RDBMS tracing/profiling second to further narrow down issues, and only then backtracking to the ORM to code review (or worst case dive into open source ORM code and make changes). AHS -- When a true genius appears, you can know him by this sign: that all the dunces are in a confederacy against him. -- Jonathan Swift