Wrong SQL count in J2EE statistics / SQL

Questions about YourKit Java Profiler
Post Reply
vidj
Posts: 8
Joined: Fri May 09, 2014 12:29 pm

Wrong SQL count in J2EE statistics / SQL

Post by vidj »

I have problems with Invocation count in J2EE statistics / SQL, it looks like it misses some SQLs. It is strange because at the beginning it counts correctly, later it starts to miss SQLs.

I have batch application that solves problems, each problems performs around 26 SQLs of one kind. If I solve 10 problems it works fine, it counts 260 SQLs as I expect. If I solve 26 problems it counts only 420 SQLs but I know there should be 794 SQLs.

I use java + hibernate
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong SQL count in J2EE statistics / SQL

Post by Anton Katilin »

Do you use version 2014?

How many SQLs do you see in the Events tab?
http://www.yourkit.com/docs/java/help/probes_ui.jsp

Could you please share the snapshot file demonstrating the problem. You may send it attached to [email protected]
vidj
Posts: 8
Joined: Fri May 09, 2014 12:29 pm

Re: Wrong SQL count in J2EE statistics / SQL

Post by vidj »

I use 2014 build 14104.

I will send two snapshots, first is with 10 solved problems and second with 26 problems. When I checked the events, I noticed strange behavior, both snapshots have the same number of connections but in second snapshot one connection is without prepared statements, but that is not possible. When I solve 26 problems first 10 problems are solved in the same manner as if I solve only 10 problems.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong SQL count in J2EE statistics / SQL

Post by Anton Katilin »

Thank you for sending the snapshots.

Java EE high-level statistics depends on corresponding built-in probes:
http://www.yourkit.com/docs/java/help/c ... _level.jsp

The problem is that the Database table is full - you may see this in the Events tab.
As the result, newer events are not recorded.

To record more events you can increase the table capacity as described here:
http://www.yourkit.com/docs/java/help/scalability.jsp
vidj
Posts: 8
Joined: Fri May 09, 2014 12:29 pm

Re: Wrong SQL count in J2EE statistics / SQL

Post by vidj »

That was the problem! If I increase table capacity, counting is OK.

Thank you!
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Wrong SQL count in J2EE statistics / SQL

Post by Anton Katilin »

Thank you for the feedback.
Post Reply