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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:38:48+00:00 2026-06-11T19:38:48+00:00

The manual indicates that SQL_NO_CACHE prevents a query from being added to the cache.

  • 0

The manual indicates that “SQL_NO_CACHE” prevents a query from being added to the cache. But it doesn’t say anything about using the cache, that I can see.

I’m trying to benchmark two versions of a query, but they’ve already been run without “SQL_NO_CACHE”. So I don’t know if my tests are using the query cache or not.

Does the “SQL_NO_CACHE” directive prevent a query from using the cache, or just from adding to it?

  • 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-11T19:38:49+00:00Added an answer on June 11, 2026 at 7:38 pm

    The MySQL query cache is indexed based on the full, literal text of the query, so there is functionally no difference: even if the directive were ignored, the results of a query with SQL_NO_CACHE would be stored in a different cache “slot” from the query without SQL_NO_CACHE. (Indeed, simply adding a space to the query somewhere, or changing “SELECT” to “select” — for instance — would also “bust” the query cache, making it run again. The MySQL query cache is not particularly sophisticated.)

    That being said, a quick test by running a query with SQL_NO_CACHE and watching the QCACHE_QUERIES_IN_CACHE status confirms that SQL_NO_CACHE does prevent variables from being stored in the cache, and a look at the source makes it look as though the presence of SQL_NO_CACHE will also keep MySQL from checking the cache for results.

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

Sidebar

Related Questions

Reading manual about Sling http://sling.apache.org/site/46-line-blog.html added folder blog and blog.html to destination: \launchpad\content\src\main\resources\content\ but
I read the manual from the php homepage It writes: // this doesn't go
In manual it said that InnoDB has row-level locking, so why if I select
I am writing a query for a sql input statement, i noticed that when
I found in the manual where to give all the document-ids that needs replication.
This link from the Gson project seems to indicate that I would have to
The manual entry for constant() says that if the constant is not defined the
http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime says that a session.cookie_lifetime of 0 goes until the browser is closed. Is
I am trying to read a file located at C:\Users\Siddharth\Documents\aarti\yeh_vidhi_mangal.txt. Following code indicates that
The manual says that the ExecuteScalar method should be used like: public T ExecuteScalar<T>(

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.