This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Prasanna Sankar

+ Follow
since Apr 28, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prasanna Sankar

Hi all,

I highly depend on jprofiler to analyze the middle tier performance in peak load. But have not been able to figure out how to correlate the CPU spike (Processor(_Total)/%Processor time 70-90%) with jprofiler data. In CPU profiling the default mode is wall clock time which is end to end time a method execution take including time taken for data to be fetched from DB. The wall clock times for each method is added up if executed by more than one thread. How does CPU time help, if wall clock time includes the CPU times by all CPU's. If I do have to get what happened in peak load. I just have to switch my thread view to runnable in my profiling session and I can get the time actually method has spent in execution.

Is my undestanding incorrect?


4 years ago

Nidhi Singhal wrote:With hibernate, you can do batch updates - it reduces the database roundtrips.

But my application is selecting not update.

Cameron Wallace McKenzie wrote:Set the SHOW_SQL setting in the Hibernate configuration file to true and take a look at exactly what SQL is being generated by Hibernate. That might prove interesting.

-Cameron McKenzie

I did that the SQL query listed in the post is from logs, the trouble the eact same query takes very less time to execute from prompt compared to hibernate and i have no clue as to why.
Hi all,

I am kind of new to hibernate. For last few days i am observing time taken to execute the hibernate query is little on the higher side.

The time taken here is only w.r.t executing the SQL query that is translated from the hibernate query.

When i take the equivalent SQL query from the logs and execute it on the oracle prompt it takes 4 ms, but i hibernate take 16 secs for the same query.

I do agree there ll be difference in performance compared this way, but performance here is like chalk and cheese.

The single SQL query formed here is something like this

select * from (select column1, column2, column3....., column 29 from A LEFT JOIN B on LEFT JOIN C on where <some criteria> order by column1) where rownum < 1001 ;

A contains 2.9 million rows
B contains 3 rows
C contains 4 million rows

All the id columns have indexed enabled.

The same query executed through JDBC takes only 2 secs.

Am i missing something here

Thanks in advance.