-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Query Caching - not quite working after an update
PostPosted: Tue May 02, 2006 1:24 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1

Name and version of the database you are using: mysql 5

The generated SQL (show_sql=true):

So I have query caching working until I do an update.

For example, I execute the same query 10 times, and from the logs I see the DB getting hit only once. Then I do an update. Then it seems the query cache fails - the same query 10 times in a row is hitting the DB.

Is this normal? (ehcache is being used)

Can someone please point me in the direction of more complete query cache logs than the 3 lines in teh documentation?

Thanks all for the help!
(I'm using SpringDAO's and thus haven't posted the code)


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 02, 2006 2:20 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
And some more information:


Code:
   /**
    * @param args
    */
   public static void main(String[] args) {
      try {
         Session session = HibernateUtil.currentSession();
         
         String name = "animalia";
         String publicationTitle = "Disney Cartoon Characters [02-05-06 07:10]";
         String rank = "kingdom";
         
         // only one comes out the logs...
         find(session, name, publicationTitle, rank);
         find(session, name, publicationTitle, rank);
         find(session, name, publicationTitle, rank);
         update(session);
         find(session, name, publicationTitle, rank);
         find(session, name, publicationTitle, rank);
         find(session, name, publicationTitle, rank);
         System.out.println("Done!");
         
      } catch (Exception e) {
         e.printStackTrace();
      } finally {
         HibernateUtil.closeSession();
      }
   }
   
   
   @SuppressWarnings("unchecked")
   protected static List<TaxonConcept> find(Session session, String name, String publicationTitle, String rank) throws Exception {       return (List<TaxonConcept>)
         session.createQuery("from TaxonConcept t where t.taxonName.parsedName.canonical=? " +
            "and t.publication.title=? and " +
            "t.taxonName.parsedName.taxonRank.id=?")
            .setParameter(0, name)
            .setParameter(1, publicationTitle)
            .setParameter(2, rank)
            .setCacheable(true)
            .list();
   }

   @SuppressWarnings("unchecked")
   protected static void update(Session session) throws Exception {
      AgentType agentType = (AgentType) session.createQuery("from AgentType where id='1'").list().get(0);
      System.out.println(agentType);
      Publication publication = new Publication();
      Agent agent = new Agent();
      agent.setName("1");
      agent.setAddress("1");
      agent.setDescription("1");
      agent.setAgentType(agentType);
      agent.setNameSort("1");
      publication.setAgent(agent);
      publication.setTitle("1");
      session.save(publication);
   }


output:
Code:
Hibernate: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?
Hibernate: select agenttype0_.id as id1_, agenttype0_.translatable as translat2_1_ from agent_type agenttype0_ where agenttype0_.id='1'
org.gbif.portal.model.agents.AgentType@103de90
Hibernate: select max(id) from publication
Hibernate: select max(id) from agent
Hibernate: insert into agent (agent_type_id, name, name_sort, description, address, telephone, email, website, logo_url, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into publication (agent_id, title, year, id) values (?, ?, ?, ?)
Hibernate: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?
Hibernate: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?
Hibernate: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?


See that the query is read from the cache the before the update (you see the SQL only once) but after the update it is executed every time...

Thanks for looking!!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 02, 2006 2:56 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
And after the update here are the logs:

Code:
DEBUG [StandardQueryCache]  checking cached query results in region: frontpages
DEBUG [EhCache]  key: sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {}
DEBUG [MemoryStore]  frontpagesCache: MemoryStore hit for sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {}
DEBUG [Cache]  sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {} now: 1146595994790
DEBUG [Cache]  sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {} Creation Time: 1146595994480 Next To Last Access Time: 1146595994490
DEBUG [Cache]  sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {} mostRecentTime: 1146595994490
DEBUG [Cache]  sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {} Age to Idle: 120000 Age Idled: 300
DEBUG [Cache]  frontpages: Is element with key sql: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?; parameters: animalia, Disney Cartoon Characters [02-05-06 07:10], kingdom, ; named parameters: {} expired?: false
DEBUG [StandardQueryCache]  Checking query spaces for up-to-dateness: [publication, parsed_name, taxon_concept, taxon_name]
DEBUG [EhCache]  key: publication
DEBUG [MemoryStore]  org.hibernate.cache.UpdateTimestampsCacheCache: MemoryStore hit for publication
DEBUG [Cache]  publication now: 1146595994790
DEBUG [Cache]  publication Creation Time: 1146595994770 Next To Last Access Time: 0
DEBUG [Cache]  publication mostRecentTime: 1146595994770
DEBUG [Cache]  publication Age to Idle: 120000 Age Idled: 20
DEBUG [Cache]  org.hibernate.cache.UpdateTimestampsCache: Is element with key publication expired?: false
DEBUG [UpdateTimestampsCache]  [publication] last update timestamp: 4696457440337920, result set timestamp: 4696457190027264
DEBUG [StandardQueryCache]  cached query results were not up to date
DEBUG [AbstractBatcher]  about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [SQL]  select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?
Hibernate: select taxonconce0_.id as id33_, taxonconce0_.taxon_name_id as taxon2_33_, taxonconce0_.taxon_rank_id as taxon3_33_, taxonconce0_.publication_id as publicat4_33_, taxonconce0_.microreference as microref5_33_, taxonconce0_.parent_concept_id as parent6_33_ from taxon_concept taxonconce0_, taxon_name taxonname1_, parsed_name parsedname2_, publication publicatio3_ where taxonconce0_.publication_id=publicatio3_.id and taxonname1_.parsed_name_id=parsedname2_.id and taxonconce0_.taxon_name_id=taxonname1_.id and parsedname2_.canonical=? and publicatio3_.title=? and parsedname2_.taxon_rank_id=?


"DEBUG [StandardQueryCache] cached query results were not up to date"

Why??? Thanks all[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 03, 2006 3:34 am 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
If I close the session and reopen it after the update, the query cache is used again.

Also if I update an object that is not used in the HQL then it works.

So it seems that doing an update of a table used by a cached query stops the session using the query cache for that query. Am I right?

Thanks


Top
 Profile  
 
 Post subject: Re: Query Caching - not quite working after an update
PostPosted: Sat Dec 05, 2009 1:28 pm 
Beginner
Beginner

Joined: Tue Sep 08, 2009 9:49 am
Posts: 23
Hi Tim,

I have the same problem, were you able to solve that problem?
As soon as a session.flush() is executed, the second level cache does no more hits.
Before the flush the cache worked well.
The log tells me that the cached results are all out of date.

It looks like that it's looking up the cache, finds an out of date object, queries the db, puts the new object into the cache. But on the next lookup it finds the outdated object again.

Code:
2009-12-05 17:56:35,540 [org.hibernate.cache.StandardQueryCache] - checking cached query results in region: org.hibernate.cache.StandardQueryCache
2009-12-05 17:56:35,540 [org.hibernate.cache.EhCache] - key: sql: select content0_.contentid as contentid19_0_, comment1_.commentid as commentid17_1_, user2_.userid as userid15_2_, contentpos3_.contentpositionid as contentp1_32_3_, content0_.views as views19_0_, content0_.dateadded as dateadded19_0_, content0_.allowcomment as allowcom4_19_0_, content0_.reported as reported19_0_, content0_.adminchecked as adminche6_19_0_, content0_.adminlockid as adminloc7_19_0_, content0_.banid as banid19_0_, content0_.descriptionid as descript9_19_0_, content0_.userid as userid19_0_, content0_.contentpositionid as content11_19_0_, content0_1_.videoid as videoid23_0_, content0_1_.url as url23_0_, content0_1_.thumbnailurl as thumbnai4_23_0_, content0_1_.recorddate as recorddate23_0_, content0_1_.hosterid as hosterid23_0_, content0_1_.hoster as hoster23_0_, content0_1_.lastapiupdate as lastapiu8_23_0_, content0_2_.photoid as photoid24_0_, content0_2_.recorddate as recorddate24_0_, content0_2_.serverip as serverip24_0_, content0_2_.originalname as original5_24_0_, content0_2_.md5 as md6_24_0_, content0_3_.collectionid as collecti2_25_0_, content0_3_.public as public25_0_, content0_3_.thumbnailcontentid as thumbnai4_25_0_, case when content0_1_.contentid is not null then 1 when content0_2_.contentid is not null then 2 when content0_3_.contentid is not null then 3 when content0_.contentid is not null then 0 end as clazz_0_, comment1_.title as title17_1_, comment1_.text as text17_1_, comment1_.date as date17_1_, comment1_.adminlock as adminlock17_1_, comment1_.editdate as editdate17_1_, comment1_.editcount as editcount17_1_, comment1_.privatemessage as privatem8_17_1_, comment1_.banid as banid17_1_, comment1_.replyid as replyid17_1_, comment1_.userid as userid17_1_, user2_.nickname as nickname15_2_, user2_.password as password15_2_, user2_.birthday as birthday15_2_, user2_.email as email15_2_, user2_.job as job15_2_, user2_.website as website15_2_, user2_.zip as zip15_2_, user2_.gender as gender15_2_, user2_.guid as guid15_2_, user2_.nicknamelower as nicknam11_15_2_, user2_.registrationdate as registr12_15_2_, user2_.lastlogindate as lastlog13_15_2_, user2_.cookieid as cookieid15_2_, user2_.userrights as userrights15_2_, user2_.locale as locale15_2_, user2_.bot as bot15_2_, user2_.countryid as countryid15_2_, user2_.banid as banid15_2_, contentpos3_.timestamp as timestamp32_3_, contentpos3_.location as location32_3_, contentpos3_.contentid as contentid32_3_, contentpos3_.userid as userid32_3_, contentpos3_.ssid as ssid32_3_, contentpos3_.rallyid as rallyid32_3_, contentpos3_.countryid as countryid32_3_, contentpos3_.commentid as commentid32_3_ from public.content content0_ left outer join public.video content0_1_ on content0_.contentid=content0_1_.contentid left outer join public.photo content0_2_ on content0_.contentid=content0_2_.contentid left outer join public.collection content0_3_ on content0_.contentid=content0_3_.contentid inner join public.comment comment1_ on content0_.descriptionid=comment1_.commentid inner join public.siteuser user2_ on content0_.userid=user2_.userid left outer join public.contentposition contentpos3_ on content0_.contentpositionid=contentpos3_.contentpositionid where (content0_.banid is null) and (contentpos3_.location is not null) and (contentpos3_.ssid is null) and (contentpos3_.rallyid in (?)) order by contentpos3_.rallyid, content0_.contentid DESC; parameters: ; named parameters: {rallyIds=50}
2009-12-05 17:56:35,540 [org.hibernate.cache.StandardQueryCache] - Checking query spaces for up-to-dateness: [public.comment, public.contentposition, public.content, public.siteuser]
2009-12-05 17:56:35,540 [org.hibernate.cache.EhCache] - key: public.comment
2009-12-05 17:56:35,540 [org.hibernate.cache.EhCache] - Element for public.comment is null
2009-12-05 17:56:35,540 [org.hibernate.cache.EhCache] - key: public.contentposition
2009-12-05 17:56:35,541 [org.hibernate.cache.EhCache] - Element for public.contentposition is null
2009-12-05 17:56:35,541 [org.hibernate.cache.EhCache] - key: public.content
2009-12-05 17:56:35,541 [org.hibernate.cache.EhCache] - Element for public.content is null
2009-12-05 17:56:35,541 [org.hibernate.cache.EhCache] - key: public.siteuser
2009-12-05 17:56:35,541 [org.hibernate.cache.UpdateTimestampsCache] - [public.siteuser] last update timestamp: 5161091869106177, result set timestamp: 5161091846336512
2009-12-05 17:56:35,541 [org.hibernate.cache.StandardQueryCache] - cached query results were not up to date
2009-12-05 17:56:35,551 [org.hibernate.cache.StandardQueryCache] - caching query results in region: org.hibernate.cache.StandardQueryCache; timestamp=5161091846336512
2009-12-05 17:56:35,551 [org.hibernate.cache.StandardQueryCache] - checking cached query results in region: org.hibernate.cache.StandardQueryCache
2009-12-05 17:56:35,552 [org.hibernate.cache.EhCache] - key: sql: select content0_.contentid as contentid19_0_, comment1_.commentid as commentid17_1_, user2_.userid as userid15_2_, contentpos3_.contentpositionid as contentp1_32_3_, content0_.views as views19_0_, content0_.dateadded as dateadded19_0_, content0_.allowcomment as allowcom4_19_0_, content0_.reported as reported19_0_, content0_.adminchecked as adminche6_19_0_, content0_.adminlockid as adminloc7_19_0_, content0_.banid as banid19_0_, content0_.descriptionid as descript9_19_0_, content0_.userid as userid19_0_, content0_.contentpositionid as content11_19_0_, content0_1_.videoid as videoid23_0_, content0_1_.url as url23_0_, content0_1_.thumbnailurl as thumbnai4_23_0_, content0_1_.recorddate as recorddate23_0_, content0_1_.hosterid as hosterid23_0_, content0_1_.hoster as hoster23_0_, content0_1_.lastapiupdate as lastapiu8_23_0_, content0_2_.photoid as photoid24_0_, content0_2_.recorddate as recorddate24_0_, content0_2_.serverip as serverip24_0_, content0_2_.originalname as original5_24_0_, content0_2_.md5 as md6_24_0_, content0_3_.collectionid as collecti2_25_0_, content0_3_.public as public25_0_, content0_3_.thumbnailcontentid as thumbnai4_25_0_, case when content0_1_.contentid is not null then 1 when content0_2_.contentid is not null then 2 when content0_3_.contentid is not null then 3 when content0_.contentid is not null then 0 end as clazz_0_, comment1_.title as title17_1_, comment1_.text as text17_1_, comment1_.date as date17_1_, comment1_.adminlock as adminlock17_1_, comment1_.editdate as editdate17_1_, comment1_.editcount as editcount17_1_, comment1_.privatemessage as privatem8_17_1_, comment1_.banid as banid17_1_, comment1_.replyid as replyid17_1_, comment1_.userid as userid17_1_, user2_.nickname as nickname15_2_, user2_.password as password15_2_, user2_.birthday as birthday15_2_, user2_.email as email15_2_, user2_.job as job15_2_, user2_.website as website15_2_, user2_.zip as zip15_2_, user2_.gender as gender15_2_, user2_.guid as guid15_2_, user2_.nicknamelower as nicknam11_15_2_, user2_.registrationdate as registr12_15_2_, user2_.lastlogindate as lastlog13_15_2_, user2_.cookieid as cookieid15_2_, user2_.userrights as userrights15_2_, user2_.locale as locale15_2_, user2_.bot as bot15_2_, user2_.countryid as countryid15_2_, user2_.banid as banid15_2_, contentpos3_.timestamp as timestamp32_3_, contentpos3_.location as location32_3_, contentpos3_.contentid as contentid32_3_, contentpos3_.userid as userid32_3_, contentpos3_.ssid as ssid32_3_, contentpos3_.rallyid as rallyid32_3_, contentpos3_.countryid as countryid32_3_, contentpos3_.commentid as commentid32_3_ from public.content content0_ left outer join public.video content0_1_ on content0_.contentid=content0_1_.contentid left outer join public.photo content0_2_ on content0_.contentid=content0_2_.contentid left outer join public.collection content0_3_ on content0_.contentid=content0_3_.contentid inner join public.comment comment1_ on content0_.descriptionid=comment1_.commentid inner join public.siteuser user2_ on content0_.userid=user2_.userid left outer join public.contentposition contentpos3_ on content0_.contentpositionid=contentpos3_.contentpositionid where (content0_.banid is null) and (contentpos3_.location is not null) and (contentpos3_.ssid is null) and (contentpos3_.rallyid in (?)) order by contentpos3_.rallyid, content0_.contentid DESC; parameters: ; named parameters: {rallyIds=50}
2009-12-05 17:56:35,552 [org.hibernate.cache.StandardQueryCache] - Checking query spaces for up-to-dateness: [public.comment, public.contentposition, public.content, public.siteuser]
2009-12-05 17:56:35,552 [org.hibernate.cache.EhCache] - key: public.comment
2009-12-05 17:56:35,552 [org.hibernate.cache.EhCache] - Element for public.comment is null
2009-12-05 17:56:35,552 [org.hibernate.cache.EhCache] - key: public.contentposition
2009-12-05 17:56:35,552 [org.hibernate.cache.EhCache] - Element for public.contentposition is null
2009-12-05 17:56:35,553 [org.hibernate.cache.EhCache] - key: public.content
2009-12-05 17:56:35,553 [org.hibernate.cache.EhCache] - Element for public.content is null
2009-12-05 17:56:35,553 [org.hibernate.cache.EhCache] - key: public.siteuser
2009-12-05 17:56:35,553 [org.hibernate.cache.UpdateTimestampsCache] - [public.siteuser] last update timestamp: 5161091869106177, result set timestamp: 5161091846336512
2009-12-05 17:56:35,553 [org.hibernate.cache.StandardQueryCache] - cached query results were not up to date
2009-12-05 17:56:35,563 [org.hibernate.cache.StandardQueryCache] - caching query results in region: org.hibernate.cache.StandardQueryCache; timestamp=5161091846336512


Maybe you or someone else can help me.

regards
Humppa


Top
 Profile  
 
 Post subject: Re: Query Caching - not quite working after an update
PostPosted: Mon Dec 07, 2009 7:06 am 
Beginner
Beginner

Joined: Tue Sep 08, 2009 9:49 am
Posts: 23
I'm not sure 100%, but I think I fixed it now.

In the JIRA I found following bug which caused the problem:
http://opensource.atlassian.com/project ... e/HHH-3339


Chris Pheby posted a workaround for the bug, which I've applied.
http://opensource.atlassian.com/project ... tion_30815


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.