Principle
Querycache (QC) is cache based on SQL statements. If an SQL query starts with select, the MySQL server will try to use QC for it. Each cache is saved using SQL text as the key. SQL text is not processed before QC is applied. That is to say, if the difference between the two SQL statements is even one characte
overhead of the QC system. However, it is certain that the QC cache function is very small. If the application layer can implement the cache, the QC effect can be ignored.
----- The following are some other details about QC ------
1. query cache parameters:
Query_cache_size the space occupied by QC. Disable the QC f
Mysql sets bitsCN.com to query the cache.
Query_cache_size = 268435456
Query_cache_type = 1
Query_cache_limit = 1048576
Stored under [mysqld] of the/etc/my. cnf file
Then restart the mysql database.
Service mysqld restart
Mysql Ca
Tags: mysql/*Name explanationSql_cache query Results cached (valid when query_cache_type=demand)Sql_no_cache query results are not stored in cacheQuery_cache_size indicates the size of the cacheQuery_cache_type Query Cache session
for other reasons. Queries using different databases, different protocol versions, or different default character sets are considered to be different queries and cache them separately.
The following SQL query cache is considered different:SELECT * FROM tbl_nameSelect * from tbl_name
Query
MySQL Query Cache defaults to open. To a certain extent can improve the effect of the query, but not necessarily the best solution, if there are a large number of modifications and queries, due to the cache failure caused by the modification, the server will cause a lot of o
Tags: for dem copy by including working principle standard value rdateworking principle: How the query cache works can be broadly summarized as: caching the result set and SQL statements for the select operation or preprocessing query (Note: 5.1.17 start support), a new SELECT statement or a preprocessing query stateme
SQL statement bitsCN.com used by MySQL to query the disk space used by all databases and the size of all tables in a single database
SQL statement used to query the disk space of all databases:
Select TABLE_SCHEMA, concat (truncate (sum (data_length)/1024/1024, 2), 'mb') as data_size,Concat (truncate (sum (index_leng
Queries the disk space used by all databases in mysql and the size of all tables in a single database bitsCN.com
Query the disk space used by all databases in mysql and the size of all tables in a single database
SQL code
Select TABLE_NAME, concat (truncate (data_lengt
Tags: qcacheFirst, the query cache descriptionMySQL query cache is used to cache the SELECT statement we execute and the result set of the statement, and MySQL is similar to typical KV storage in the specific technical details of
Recently, when I was tuning MySQL, I felt that the query cache of MySQL was not as big as possible,
Because the cache actually fails when the data table changes as follows:
Including insert, update, delete, truncate, alter table, drop table, or drop database.
Theref
The query cache stores the SQL statements and the corresponding results that are sent to the client. When executing the same SQL statement, MySQL server retrieves the results directly from the query cache, eliminating the need to parse and execute the SQL statements. The
Tags: blog class tar c http widthOriginal: MySQL Query cacheMySQL Query execution processQuery Process :
The client sends a query to the server;
The server checks the query cache first, and returns the results stored
Maybe some people just need to adjust the size of the query_cache_size to 0, you can ignore the value of the Query_cache_type parameter, it can be adjusted online anyway.Is that really the case? Let's go through the actual simulation test to know.We simulate the following scenarios:1. When initializing, the value of setting query_cache_size and Query_cache_type is 0;2, initialization, set query_cache_size = 0, but set query_cache_type = 1;3, initializ
Tags: like fit flush from a tables OBA SEL representationThe current query cache correlation parameter status can be viewed from the following SQL:SHOW VARIABLES like '%query_cache% ';The output is similar to the following:Query_cache_typeThe query cache type has 0, 1, and 23 values. 0 does not use the
MySQL Query Cache (Cache) SQL code www.2cto.com # Example MySQL config file for medium systems. # is generated by editing the mysql-5.1.37-win32 OF THE my-medium.ini, and the application and database are on one machine. # This is
sec)Mysql> ctrl-c-exit!AbortedROOT@XXXX ~# my 3003Entry Port = = 3003Welcome to the MySQL Monitor. Commands End With; or \g.Your MySQL Connection ID is 4601147Server Version:5.1.61-alibaba-3930-log Source DistributionCopyright (c), the Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark the Oracle Corporation and/or itsAffiliates.
Tags: blog http SP data log BS new asQuery cache:The result of a SELECT statement is cached, and the next time the same SELECT statement is run, the data can be returned directly, skipping parsing, execution, and optimization phases.1, the query cache will track the tables involved in the query, if the table changes, the relevant
Summary of MySQL Query table data size in linux-Linux general technology-Linux technology and application information. for details, refer to the following section. · 1. mysql table data size
1.
2. we know that mysql generally use
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.