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 October MySQL: Frequently asked Interview Questions and Answers Part 6

MySQL: Frequently asked Interview Questions and Answers Part 6

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

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 works for better performance.
Whenever table modified with data, then Query cache will be flush.
Please visit this is article for more details:


Does MySQL Query Cache improve the database performance?

Yes,
When you trigger any select statement and if it is available in the cache then it will return from there only not require parsing and fetching from disk so its improve a query performance.
Please do not assume that this will work under all circumstances because this is also depends on your load of memory and server.


In which conditions MySQL 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.


The command to set size of the MySQL Query Cache:

SET GLOBAL query_cache_size = 1000000;


The command to check size of the MySQL Query Cache:

SHOW VARIABLES LIKE ‘query_cache_size’;


What is SQL_CACHE and SQL_NO_CACHE?
Please visit this article for more details:
SQL_CACHE:
The query result is cached if it is cacheable and the value of the query_cache_type system variable is ON or DEMAND.

SQL_NO_CACHE:
The server does not use the query cache. It neither checks the query cache to see whether the result is already cached,nor does it cache the query result.


What is the difference between VARCHAR(3) and CHAR(3).

No difference: VARCHAR with length less than 4 become CHAR.


What is the difference between VARCHAR(10) and CHAR(10).

No difference: CHAR with length more than 3 become VARCHAR.

Oct 5, 2015Anvesh Patel
MySQL: Frequently asked Interview Questions and Answers Part 5MySQL: Frequently asked Interview Questions and Answers Part 7
Comments: 1
  1. Vinay Pandey
    October 19, 2016 at 12:30 pm

    How can i be sure with the below answer.?
    Is there any way prove it practically .

    What is the difference between VARCHAR(3) and CHAR(3).
    No difference: VARCHAR with length less than 4 become CHAR.

Anvesh Patel
Anvesh Patel

Database Engineer

October 5, 2015 MySQL, MySQL Interviewanswers, Anvesh Patel, database, database research and development, dbrnd, interview, MySQL, MySQL Command, MySQL Database Administrator, MySQL Database Designing, MySQL Database Programming, MySQL Error, MySQL Performance Tunning, MySQL Query, MySQL Tips and Tricks, questions
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....