This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Using Query cache and second level cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Using Query cache and second level cache" Watch "Using Query cache and second level cache" New topic

Using Query cache and second level cache

ram shyam
Ranch Hand

Joined: May 04, 2007
Posts: 77

I would like to know if the following is possible to achieve using query cache mechanism.

Being a fresher to Hibernate, I understood the basic purpose of using query cache, ie, to fetch the data from the cache instead of fetching from the DB each and every time which increases the performance.

My requirement is as follows-
I fetch a set of 10 records from the DB and cache them using query cache and second-level cache. Now, would it be possible to fetch next or previous set of 10 records using already cached identifier values? If possible, could you please let me know how it can be achieved?
If not, is there any other means to achieve this?

Thanks in advance!!
[ May 10, 2007: Message edited by: deepa gr ]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32508

Moving this to our ORM forum since it has to do with Hibernate.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271


Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names, and no underscores.



Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Using Query cache and second level cache
jQuery in Action, 3rd edition