wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Is hibernate not slow for usage? Is it still suitable for User login Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Is hibernate not slow for usage? Is it still suitable for User login" Watch "Is hibernate not slow for usage? Is it still suitable for User login" New topic
Author

Is hibernate not slow for usage? Is it still suitable for User login

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 541
Hibernate has advantages but is quite slow. Is it suitable for user login etc?

thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18152
    
    8

I used it for user login. Nobody complained.
Will Myers
Ranch Hand

Joined: Aug 05, 2009
Posts: 313

I've not found Hibernate any slower than straight JDBC and in some situations can give the illusion of better performance, of course you can use it badly and it will be dog slow
soundar rajan
Greenhorn

Joined: May 08, 2013
Posts: 16
Hibernate having the caching mechanism; we can get some performance improvement after caching the SQLs.

Also we have to define strategies for fetching data from the database based on the requirement either lazy or eager

The EAGER strategy is a requirement on the persistence provider runtime that data must be eagerly fetched.
The LAZY strategy is a hint to the persistence provider runtime that data should be fetched lazily when it is first accessed.

We have to avoid more reference tables when we designing the Data Model for hibernate.
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 541
thanks.I had read this in the section of advantages and disadvantages of Hibernate.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39575
    
  27
Hibernate certainly introduces a non-negligible overhead, for example it tends to cause lots of small queries retrieving IDs to be run against the DB. For an app with 10 users that may not matter; with 1000 users, that may kill the DB. I would think that most ORM systems suffer from similar issues, and should thus be used with care. The SQL they generate ORMs is just not well optimized.

I agree that one must carefully evaluate where (and whether) it makes sense to use built-in caches of the ORM vs. putting in place caches in the application code.


Ping & DNS - updated with new look and Ping home screen widget
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 541
thank you
 
 
subject: Is hibernate not slow for usage? Is it still suitable for User login
 
Similar Threads
Hibernate 2nd level cache - Real time aplication
how to reject multiple logins
Hibernate 2 to Hibernate 3 migration
view huge amount of records in JSP page
Login action class using struts 2