In small memory VPS, kids shoes (including me) generally love to do the so-called "optimization". Among them, MySQL optimization has three parameters:
Skip-innodb/skip-bdb/skip-locking
In particular, the first parameter is said to save memory
2 Index and Query Optimization
Index type
Ø normal index: This is the most basic index type and has no restrictions such as uniqueness.
Ø unique index: It is basically the same as a normal index, but all index column values are unique.
Ø primary
To optimize the query, try to avoid full table scanning. First, consider creating an index on the columns involved in where and order: . Try the following tips to prevent the optimizer from selecting a table scan error: · Use analyze table tbl_name
Record an SQL statement first.Select uid, rank, money, e, from_unixtime (time/1000) from stats_2012_01_19 where comm = 8888 and e> 40 and from_unixtime (time/1000) between '2017-01-19 00:00:00 'and '2017-01-19 01:00:00'Then start to convert
MySQL slow query supports millisecond settings MySQL slow query itself does not support the ms level (requires patching), but for MySQL 5.21 +, the minimum value of long_query_time is 0 (the minimum value is 1 s in versions earlier than 5.2.1), and
Local or remote connection to mysql: Unable to connect to any of the specified MySQL hosts solution: 1. firewall Enabled, and allow remote connection 2. the connection string is different for mysql versions or drivers. note that even the local
MySQL experience 10-1-transaction 1. In the MySQL environment, a transaction is composed of one or more SQL statements as a separate unit. Each SQL statement in this unit is mutually dependent, and the Unit as a whole is inseparable. If a statement
MySQL audit plug-in installation instructions-the upgraded version is based on the mysql audit plug-in designed and developed earlier, and the MySQL audit plug-in installation instructions http://www.bkjia.com/database/201207/143906.html To add and
We often need to optimize the MySQL database, and cainiao will go to phpMyAdmin one by one.PHP development is generally implemented in website programs through php, but these two methods are not good enough.The following is a tip for you: Use
Import data from RRD Database to MYSQL. 1. RRD Database and RRDTOOL indicates Round Robin Database. The design concept is to store data in the round-robin mode. After a period (which can be customized), new data will overwrite the original data.
MySQL database command line tool MySQL includes a server process to manage the database, as well as a series of tools for accessing the database and creating applications: mysql: Execute SQL queries in MySQL, you can also execute SQL commands stored
The problem that the MySQL table field name contains a minus signWhen inserting data into MySQL Data, the SQL syntax error is always prompted. After half a day of check, it turns out that the table name contains a minus sign. Original TABLE
Shell simple full-backup mysql script case [root @ cacti mysql] # cat backup. sh #! /Bin/sh www.2cto.com # created by taiyang #2012-9-16 # function: backup mysql database # set local variablesDBname = backupBackupPath =/mysqlbak/DumpFile =$
'. SQL 'Big data backup file segmentation and merge for several GB big data backup files, if we encounter many problems during the data import process, and want to avoid inserting duplicate records, you need to split the file and extract the
Query the disk space used by all databases in mysql and the size of all tables in a single database SQL code www.2cto.com select TABLE_NAME, concat (truncate (data_length/1024/1024, 2), 'mb') as data_size, concat (truncate (index_length/1024/1024, 2)
Mysql Field * doesn't have a default value solution in MySQL 5, an error message is displayed: Field 'id' doesn' t have a default value www.2cto.com solution 1: open my. ini, find SQL-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER,
View the mysql process -- show processlist: Use show processlist to view the current running status. Mysql> show processlist; www.2cto.com, displays the IP address and port number from which the current process is sent. The db column shows which
In mysql-cluster, the SQL node (master) and the Independent mysql server (slave) are used to copy (troubleshoot) The cluster environment: www.2cto.com mysql-cluster 7.2.8 (mysql 5.5.27; ndb 7.2.8) 192.168.55.11 mgm node (nodeid = 1) 192.168.55.10
[Architecture] MySQL Log File-Error Log (I) What is it? Record detailed information about MySQL Server startup and shutdown, and serious warnings and error messages during running [SQL] mysql> show variables like 'Log _ error '; + --------------- +
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service