Wednesday 2 November 2011

Hibernate Performance.

After reading a few posts on the internet the following are my
conclusions:

1. Insert or Update operations in Hibernate work fairly good (not as
good as JDBC but close). So we do not need to do any improvement around
those operations other than just doing inserts in batch and avoid
Updates as they are costly anyways.

2. Select operation is very costly in Hibernate as compared JDBC. The
reason is hibernation of Data in objects. We can not avoid selects and
the way we program in hibernate we do a lot of them. The only way around
this problem is caching. We need to attach hibernate with a cache or
enable it if its already present in Hibernate.

3. Another improvement is to use Opportunistic locking by marking our
selects transactions as read-only.

So, basically Hibernate has an overhead and so will spring. Ease of
programming comes with a cost, now the question is how to reduce the
performance cost and keep achieving our Benchmark targets.

No comments:

Post a Comment

Azure OpenAI Architecture Patterns & Deployment Patterns

Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...