Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7488157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:46:00+00:00 2026-05-29T14:46:00+00:00

I have enabled second level and query caches in my app Looks like when

  • 0

I have enabled second level and query caches in my app
Looks like when I invoke following code

String sql = "update SOME_TABLE set SOME_FIELD=somevalue";
SQLQuery query = getSession().createSQLQuery(sql);
query.executeUpdate();

hibernate updates UpdateTimestampsCache for ALL tables. Why he does this? I have about 1000 tables and many sql queries in my app. I dont need this updates because I dont update cached tables via sql. It causes huge netwrok traffic and slowneess of application.

Is there a way to tell hibernate to NOT do any updates when running sql queries?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T14:46:03+00:00Added an answer on May 29, 2026 at 2:46 pm

    I found solution!

    You can use addSynchronizedEntityClass() method

    String sql = "update SOME_TABLE set SOME_FIELD=somevalue";
    SQLQuery query = getSession().createSQLQuery(sql);
    query.addSynchronizedEntityClass(SomeTable.class)
    query.executeUpdate();
    

    In this case it will reset just cache for SOME_TABLE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code written to make my lazy second CPU core working.
Please help regarding the following issue. I have enabled the Block popup option in
I have two sprites in my app. Both should have touches enabled and both
In my ASP.NET MVC 3 app I have the pager enabled on my jqGrid,
I have 2 table database; Firt table's columns; ClubID(Primary key, auto-increment enabled), ClubName Second
I'm trying to implement the following: I have 2 tree panels with enabled drag
I have enabled the Web Server on my Mac OS X (10.5.6) by going
I have enabled the lighttpd mod_webdav module and set up a webdav mount point
I have a combobox that I have Enabled = false. When that is the
I have an Java application running in JBoss in which I have enabled JMX

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.