For large web sites such as Facebook,ebay, if there is no memcache as an intermediate cache layer, data access is not possible do, for the general web site, as long as the independent server, can be configured memcache improve the speed of Web site access and reduce database pressure, Here we discuss the process relationship between Memcache and MySQL database interaction process, understand the Memcache bu
system and provides interfaces for Disk File interaction with memory. The entire buffer pool is organized mainly through these linked lists.Buf0lru. C is used for cache replacement in the buffer system. Algorithm The main operation object is the LRU linked list, which aims to better use the cache.Buf0flu. c is the part in the system that writes data to the disk. To save the system I/O overhead, InnoDB also considers dirty pages in the current system,
Running MySQL Status View monitor running MySQL, one way is to view MySQL running status. (1) QPS (query amount per second) qps = Questions (or Queries)/secondsmysql > show global status Like ' question% '; (2) TPS (transaction volume per second) tps = (Com_commit + com_rollback)/Secondsmysql > show global S Tatus li
function, but it is not enabled by default. This article will introduce you to MySQL (the best combination with PHP) query adjustment buffer settings (have_query_cache) can increase the speed of MySQL (the best combination with PHP) by at least five times.
The query cache s
created, if the threads_created value is found to be too large, it indicates that the MySQL server has been creating threads, which is also a relatively resource-intensive, can appropriately increase the thread_cache_size value in the configuration file, Query Server Thread_cache_size configuration:Mysql> Show variables like ' thread_cache_size ';+-------------------+-------+| variable_name | Value |+-----
The Table Cache
--------------------------------------------------------------------------------Table cache objects: tables
Each cached object contains the parsing result of the related table. frm file, and some other data is added.
To be accurate, the content of other data in an object depends on the storage engine of the table. For example:
MyISAM is the table data and index file descriptor.
Merge may be
query cache value is emptied. - -'%query_cache%';Parameter explanation:
Have_query_cache
Indicates whether the MySQL version supports query caching.
Query_cache_limit
Represents the maximum value that a single result set is allowed to cache
1. Enter the Mysqladmin processlist into the Mysql/bin catalogue;
2. Start MySQL, enter show Processlist;
If you have SUPER permissions, you can see all of the threads, otherwise you can only see the thread that you originated (this is the current corresponding MySQL account running thread).
The data forms are as follows (only three are intercepted):
I have been working for a year. It is also the first time I have used Mysql indexes. I was amazed at the speed improvement after I added an index. When the old employee next door saw my big fuss, he calmly replied, surely? The index is the most important factor for optimization. For a small amount of work for a year, it is also the first time to use the Mysql index. I was amazed at the speed improvement aft
Today when checking the MySQL server prompt sort aborted:out of sort memory, consider increasing server sort buffer size, installation literally means sort memory overflow, consider adding server Sort buffer (sort_buffer_size) size
sort_buffer_size=3mJoin_buffer_size = 3M
The following are the parameters for the 16G memory setting:
Sort_buffer_size = 2M# sort_
not null insert @ cust (custno) select top (200) custno from mers where custname LIKE @ custname + '%' order by custnameELSE RAISERROR ('no query condition is provided! ', 16, 1) SELECT... FROM @ cust cJOIN customers cst ON cst. custno = c. custnoJOIN...
This writing method has a potential performance problem. no matter how you select the query conditions, we want the optimizer to use the index of the
for the query cache value is emptied.
-- query cache related parameters
'%query_cache%';
Parameter explanation:
Have_query_cache
Indicates whether the MySQL version supports query caching.
Que
Multi-table query data, write multiple SQL separate query good, or write a SQL to do a joint query good?
Reply content:
Multi-table query data, write multiple SQL separate query good, or write a SQL to do a joint query
This tutorial is suitable for PHP programmers who are interested in caching SQL queries to reduce the load on database connections and execution, and improve script performance.OverviewMany sites use databases as containers for site data storage. The database contains production information, directory structure, articles, or message books, some of which are likely to be completely static, and will benefit greatly from a cache system.Such a system can
MySQL Query optimization-Admin when you perform administrator optimization, remember the following rules:
? Accessing data in the memory is faster than accessing data on the disk.
? Store data in the memory as much as possible to reduce disk operations.
? Retaining the information in the index is more important than retaining the content of the data record.
We will discuss how to apply these rules later.
I
At that time, I was thinking that MySQL would sooner or later be compatible with a set of key: value interfaces. It was very short to see that MySQL supported the Memcached interface. How many intermediate solutions would this happen?
At that time, I was thinking that MySQL would sooner or later be compatible with a set of key: value interfaces. It was very short
To use Redis as a MySQL database cache, 2 issues must be resolved. First, you should determine what data structure is used to store your MySQL-based information , and after determining the data structure, consider what identity is used as the key to the data structure.Visually, the data in MySQL is stored on a table, a
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.