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 8372795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:31:35+00:00 2026-06-09T14:31:35+00:00

I am creating a java desktop application. I am using mysql database as back

  • 0

I am creating a java desktop application.

I am using mysql database as back end.

In my application some query was get executed more than one time, so i want to cache the query result and use it for the next time.

For caching i try prepared statement but i don’t get any positive result.

Is any other way to cache the query and query result set?

  • 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-06-09T14:31:37+00:00Added an answer on June 9, 2026 at 2:31 pm

    Please check the version of mysql that you are using. It seems
    Before MySQL 5.1.17, prepared statements do not use the query cache.
    http://dev.mysql.com/doc/refman/5.1/en/query-cache-operation.html

    It also mentions some conditions under which query cache will not work. I think the alternative to that is to use memcache, but I don’t know how good it is. But one thing for sure all these caching methods donot work well if you have frequent updates. You don’t really have much control on the cache I guess, it gets invalidated when ever there is an update on actual table(to avoid dirty reads) So I suppose yours is not so frequently updated table while in production. And if that is the case you can very well think of using application level caching with ofcourse cache invalidation service/criteria in place.

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

Sidebar

Related Questions

I'm creating a Java desktop application and was wondering how I should deal with
I'm creating a java desktop application that draws a map in a JFrame designing
When creating a new project in netbeans, if i select JAVA Desktop application, it
I am creating a Java Swing based desktop application in Netbeans. The application consists
I'm creating a Desktop Java application which needs to store (what could become) reasonably
I am creating a Java desktop application where the user will enter his name
I am creating a Java Application using netBeans and Swing Gui Builder. I am
I'm creating (for a semester project) a Java desktop application. The aim is to
I'm creating Java wrappers for some C code using JNI. There are dependencies on
Possible Duplicate: Creating online help in Java Swing application - using pdf user docs

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.