i working on new project on existing code . uses hibernatetemplate.findbynamedqueryandnamedparam invoke stored procedure in database .
when execute stored procedure on database , executes in 2 or 3 seconds . execute via hibernatetemplate method , takes anywhere between 2 34 minutes .
when turn showsql on , see there thousands of select statements being triggered . pointers on possible reasons why happen .
your problem may caused bad configuration of 2nd level cache , query cache.
check expiration time of query cache same expiration time 2nd level cache - entities fetched query -. (look ehcache config file -or other 2nd level cache provider using-)
Comments
Post a Comment