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 like ' Com_commit ',
Tags: style color io using AR for strong SP dataFirst: Query_cache_type How to use query cachingIn general, we will set the Query_cache_type to on, which should be on by defaultMysql> SELECT @ @query_cache_type;+--------------------+| @ @query_cache_type |+--------------------+| On |+--------------------+Query_cache_type has 3 values of 0 for closing the query cache off,1 on behalf of on,2 (DEMAND) represents the
.
Verify:
The authentication method is very simple, run cat 3 >/proc/sys/vm/drop_caches under the shell with root privileges to empty the OS file cache and run SQL to see if it is the same speed as the first run.
Results:
Well, afterEcho 3/proc/sys/vm/drop_caches , it's slow again, and it looks like you're talking about a problem.
Extended:
Once you know the MyISAM feature, you can use the file pre-re
Supports more than 100 adjustable settings; Fortunately, mastering a few can satisfy most of the needs. Finding the correct values for these settings allows you to view the status variables by using the show status command to determine whether the mysqld is working as expected. The memory allocated to buffers and caches cannot exceed the existing memory in the system, so tuning usually requires some compromise.
The MySQL adjustable settings can be ap
when it comes to large amounts of data. Note that large files provide higher performance, but will take more time to recover from the database. I usually use 64m-512m, depending on the server space.
Innodb_log_buffer_size
The default value is available for most middle write operations and for short transaction use. You should increase this value if you often make updates or use a lot of BLOB data. But too big is also a waste of memory, because 1 seconds will always flush (the word in Chinese
Query_cache_type How to use query cachingIn general, we will set the Query_cache_type to on, which should be on by defaultMySQL>SELECT@ @query_cache_type; + -- ------------------+ | @ @query_cache_type | + -- ------------------+ | on | + -- ------------------+Query_cache_type has 3 values of 0 for closing the query cache off,1 on behalf of the on,2 (DEMAND) represents the cache when there a
MySQL one table to another table guide data, where the new table has a field is a fixed value, SQL statement how to write?
Reply content:
MySQL one table to another table guide data
I have a topic table, including content title author and other information, accompanied by a Topic_extra contains the number of replies, likes, satisfaction reply, update and other information. A total of 14 fields, each table after the split is only six or seven, I think the table can be small, small bar.
The contradiction is that when the query needs to be fe
Tags: pom.xml list over association table data effect namespace implementation ntsReprint: http://blog.csdn.net/xiadi934/article/details/50786293Project environment: in SPRINGMVC +spring + MyBatis + MySQL. Redis is deployed on Linux virtual machines.1. Overall thinking
Reference Ehcache implements MyBatis level two cache code (MAVEN reference jar lookup)
Mysql stored procedure: copy A column of Table A to Table B to go to bitsCN.com
Mysql stored procedure: copy A column of Table A to Table B
This is a stored procedure used to copy the value of the avalue column in
MySQL is treated as a permission operation, after adding a user or other table operations. There are two ways to take effect, one is to restart the service, and the other is to use the flush command. Second, you must have the reload permission to use flush.
The following are the main parameters of the flush command.
Hosts clears the host cache
MyISAM operations are faster under lock tables because MySQL does not empty the critical cache for locked tables until unlock table is called. Typically, the critical cache is emptied after each SQL statement.·If you are using a storage engine that does not support transactions in
I wrote a simple mybatisdemo without integrating other transaction management functions and connecting to the mysql database. This nested SQL statement is defined in the mapper of the table file_resources. the postinfo and poststatus tables quot; selectcount (*) fromfile_resourceswhereobjectNamein (distinct (selectPostLinkfrom... mysqlmybatis caches the namespace database
I wrote a simple mybatis demo
By default, MySQL does not have the Query_cache feature turned on.MariaDB [(None)]> show variables like '%query_cache% ';+------------------------------+---------+| variable_name | Value |+------------------------------+---------+| Have_query_cache | YES | -----indicates that the current MySQL version supports the query cache feature| Query_cache_limit |1048576
Database Table Design for Mysql optimization and database table Optimization for mysql
Separation of Fixed Length and Variable Length
Separation of common and uncommon Columns
For example:
This table is not good enough and can be optimized.
Analysis: Except the user
MySQL table Structure Modification Operation Command summary, mysql table structure command
The table structure is as follows:
Copy codeThe Code is as follows:Mysql> show create table person;| Person | create
Tags: requires SEL basic Select Collection Cache row Store Mysq objectThere are two issues to consider when using Redis as a MySQL database cache:1. Determine what data structure is used to store the information from MySQL;2. After determining the data structure, what identity is used as the key of the data structure .
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.