Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2015 August MySQL Query Cache Part I/II

MySQL Query Cache Part I/II

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

Introduction to MySQL Query Cache: Part I

Today morning, I was monitoring MySQL Production database.

I found out the list of running sessions with different SQL queries. I created some master and primary tables in MySQL which stored settings and configuration data for one of our Mobile App.

As these tables are for configuration purpose so not frequently update by the application.

But today, I was worry because of this configuration table was utilizing more CPU I/O. I created this all tables under InnoDB MySQL Storage engine.

I cannot store all this data under Memory engine because this all are primary data for our Application.

So I was finding a solution for faster retrieval and found that MySQL has a good option called a Query Cache.

In this post, I am sharing theory of MySQL Query Cache and I will share the second part of the practical configuration of MySQL Query Cache by tomorrow.

What is MySQL Query Cache ?
Sort & Simple, MySQL Query Cache stores some frequent SELECT statements with its corresponding results.

When table data are not changing frequently and the server receives many identical queries then only Query Cache returns data from the Cache area.

Whenever table modified with data, then Query cache will be flush.

I surprised by this feature of MySQL which improve your query performance in some circumstances.

When you trigger any select statement and if it is available in the cache, it will return from there and not require parsing and fetching from disk so it improves a query performance.

Please do not assume that this will work under all circumstances because this also depends on your load of memory and server.

You can also set the size for Query Cache but make sure that it should not be higher otherwise its create memory overhead for the whole server.

Few conditions in which Query Cache will not work:

  • Not use when multiple server hitting to one query.
  • Not use with Stored Procedure and UDF.
  • Not use with any type of Variables.
  • Not use with any table of default database like, MySQL, INFORMATION_SCHEMA.
  • Not use with partition tables.
  • Not use with Temporary tables.
  • Not use with Prepared Statements.

Please visit MySQL Query Cache Part II for the configuration of Query Cache:

Aug 8, 2015Anvesh Patel
Find Free and Occupied space by SQL Server DatabaseMySQL Query Cache Part II/II
Anvesh Patel

Database Engineer

August 8, 2015 Database Theory, MySQLAnvesh Patel, database, database research and development, MySQL, MySQL Command, MySQL Database Administrator, MySQL Database Designing, MySQL Database Programming, MySQL Error, MySQL Performance Tunning, MySQL Query, MySQL Tips and Tricks, Query Cache
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....