JPA/hibernate show the JPQL with the related JDBC SQL?

Questions about YourKit Java Profiler
Post Reply
sebtardif
Posts: 1
Joined: Tue Oct 03, 2017 1:30 pm

JPA/hibernate show the JPQL with the related JDBC SQL?

Post by sebtardif »

I want to know if YourKit support showing the original JPQL or HQL SQL emitted, and under these, the many JDBC query generated?

So, for example, would like to see when a single JPQL query generates one thousand JDBC SQLs.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: JPA/hibernate show the JPQL with the related JDBC SQL?

Post by Anton Katilin »

I believe you should be able to see this in the "Events" tab:
https://www.yourkit.com/docs/dotnet/help/probes_ui.jsp

Also, the current version shows some high level event detail directly in call trees.
sjivan
Posts: 10
Joined: Wed Apr 25, 2007 11:49 am

Re: JPA/hibernate show the JPQL with the related JDBC SQL?

Post by sjivan »

Hi,
I'm trying to determine the SQL executed by JPA. I went to the Events tab and filtered on JPA/Hibernate and SQL and I see the JA/Hibernate calls in the table with an expandable column that shows the SQL related operations. (I needed to have SQL enabled in the filter to see the nested SQL operations under the JPA/Hibernate) tree node. However the "SQL" text in the details on shows an abbreviated / truncated SQL text (around 45 characters) and not the entire SQL. See link to screenshot : https://cln.sh/jdbJfv

How to I get to see the entire SQL corresponding to the JPA/Hibernate operations? Also should I be seeing these SQL calls originating from JPA/Hibernate as top level SQL entries in the Events table if I filter to only show the "SQL" events?
Thanks,
Sanjiv
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: JPA/hibernate show the JPQL with the related JDBC SQL?

Post by Anton Katilin »

Hi Sanjiv,

Please specify -Dyk.timeline.str.len.limit=1000 (or whatever number you need; the default is 40) in <user home>/.yjp/ui.ini

Best regards,
Anton
Post Reply