Wednesday, 2 November 2011

HQL with Spring JDBC

After doing some more research the following is my suggestion to improve
performance. I am not sure how easily it's possible, if its' really
possible.

I would recommend using "HQL with Spring JDBC".

Spring JDBC basically makes using JDBC easier but still uses JDBC, so we
can get good performance.

HQL helps us write standard queries which mean we can get cross platform
flexibility as well.

What do you think? Is this combination possible?

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.

Friday, 21 October 2011

Comparing date in SQLServer

DATEDIFF(DAY, START_DATE, END_DATE) = 0
AND
DATEDIFF(MONTH, START_DATE, END_DATE) = 0
AND
DATEDIFF(YEAR, START_DATE, END_DATE) = 0

Adding a Date to a date in SQL Server

DATEADD(DAY, No of days to add, date_to_which_days_are_added)




Example:



DATEADD(DAY, 1, START_DATE)

Wednesday, 28 September 2011

Intalling Jars in your local Maven repository

Command:


mvn install:install-file -Dfile= -DgroupId= \
    -DartifactId= -Dversion= -Dpackaging=

The above command will install jar file into your local ~/.m2 directory.

Example:

mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.jdbcdriver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar



Executive Summary: Anthropic's Claude Mythos Model

  What Happened Anthropic announced  Claude Mythos Preview , a new AI model it describes as its most capable ever — and so powerful in cyber...