Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate has advantages but is quite slow. Is it suitable for user login etc?

thanks
 
Paul Clapham
Sheriff
Pie
Posts: 20948
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used it for user login. Nobody complained.
 
Will Myers
Ranch Hand
Posts: 381
Java jQuery Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.I had read this in the section of advantages and disadvantages of Hibernate.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic