A mysql database query performance problem encountered this week. Similar to the following simple query in a MYSQL table, it takes nearly one second. The table www.2cto.com 1 select sum (col5), sum (col6) from table_name2where col_key_2 = 'value1
Mysql str_to_date string to date mysql built-in function, in mysql, use str_to_date () to convert string to date. Instance: www.2cto.com has the same separator, and the year, month, and day must be consistent select str_to_date ('2014/1/2 12:00:34
[Mysql] MyISAM Table Storage Format MyISAM supports three different storage formats: fixed format, dynamic format, and compressed format (only created using myisampack ). Static table features (fixed format) Static format is the default storage
Mysql account management 1. CREATE an account Shell code create user 'jeffre' @ 'localhost' identified by 'my pass'; www.2cto.com 2. delete an account (deleting an account also deletes all its permissions) shell code drop user 'Jeffrey '@ 'localhost'
Mysql prefix index Application Scenario: There is an address field in the database, the type is varchar (100), the business determines the need to often based onAddress. Determine the Selectivity of www.2cto.com: SQL code SELECT count (DISTINCT
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 for a system with
The following table analyzes the sorting of null values in mysql: t_user: name agezhangsan 1 lisi NULLwangwu 2 www.2cto.com execute the SQL: SQL code select * from t_user order by age; name agelisi NULLzhangsan 1 wangwu 2 In fact, we want to put
I have never encountered any problems with migrating mysql to db2 before, so this work has been very hard. The following problems occur: installation problem www.2cto.com 1. for user problems, users with different permissions must be created and
Mysql stress test shell script Mysql comes with the stress test tool mysqlslap, so we don't have to write our own program to test the pressure on Mysql reading. The stress test shell script is as follows: www.2cto.com [plain] #! /Bin/sh while true
Mysql5.5 set up master-slave replication 1. note: (1) the Master/Slave server version must be the same (2) to change the root password, do not use the initial password (this is irrelevant to Master/Slave replication, for database security
Mysql built-in scheduled task learning Java code www.2cto.com show version (); // version later than 5.1 show variables like '% event %'; event_scheduler | off set global event_scheduler = ON; // enable the scheduled task SELECT * FROM mysql. event \
Mysql SQL statement optimization common mistakes: www.2cto.com misunderstanding 1: count (1) and count (primary_key) are better than count (*) Many people use count (1) to count the number of records) and count (primary_key) instead of count (*),
Mysql authorizes grant all privileges 1. Change the table. It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log on to mysql on the localhost computer and change the "host" entry in
Mysql batch deletes a large amount of data. Assume that one table (syslogs) has 10 million records, and you need to delete all the records with statusid = 1 without stopping the service, with about 6 million records, if you directly execute delete
Install Multiple mysql databases under win7(1) install mysql in the corresponding directory. The default port for installing mysql is 3306.(2) Copy all MYSQL_PATH files to the mysql directory you want to install, tentatively set to MYSQL3307,(3)
Mysql utf8 garbled characters in the windows command line. If you want to set the database encoding to utf8, you must first set my In the mysql installation path. the default-character-set attribute in the INI file is set to utf8, that is,
Mysql stored procedures using variables as table names 1. use variables as table names: simply use the set or declare statement to define variables, and then directly use the SQL table name. mysql regards the variable name as the table name. This is
Mysql import. run the following command in the dos mysql installation directory/BIN directory: mysql-u username-p databasename use database_name and then run the following command mysql> source 111. SQL is 111 by default. the SQL path must be put in
The mysql-proxy read_query method implements authentication connection after special SQL is executed. In mysql-proxy, you can set session variables, this function allows you to perform Secondary authentication by executing the specified SQL
"MySQL server has gone away" reproduction method (PHP) If you want to debug the problem of "MySQL server has gone away", you can reproduce it as follows: modify the configuration file: [html] sudo vi/etc/mysql/my. cnf: [html] [mysqld] wait_timeout =
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