SELECT * and SELECT fields are optimized.
Let's test it. My test database contains 0.26 million records.
Query the number of columns:
Select count (*) FROM information_schema.columns WHERE table_schema = "lezhi_data 'AND table_name = 'demo _
Use the REGEXP keyword
1. Basic Character matching
?
1 2 3
SELECT prod_name From Products Where prod_name REGEXP '. 000'
Difference between LIKE and REGEXP
LIKE matches this column, while REGEXP matches the column
Enter the following in dos mode:
1. cd C: \ Program Files \ MySQL Server 5.5 \ bin
2. mysql-h127.0.0.1 (address of the host you want to access)-uroot (User Name)-proot (password)
3. show variables like 'character % ';
You can view the mysql
Recently, the project database management system was migrated from SQL SERVER2000 to MySQL. After connecting to SQL SERVER Based on ADO and using the MySQL database management system, the database creation, table creation, and database read/write
1. Test 1Create table test (id int, tag int, num int );Insert into test (id, tag, num) values (1, 1, 1), (2, 2), (3, 3 );Update test setTag = 4, num = case when tag = 4 then 4 else 3 endWhere tag = 3;Select * from test;(1) sqlserver2014 results:(2)
I was still very comfortable with the development in linux. I continued to record the problems in mysql.
The root (localhost) password of mysql cannot be logged in according to the online tutorial yesterday, and the User = ''is also deleted
Use show variables like 'character % 'to view the database encoding. latin1 is expected.
If the project is being tested and the data is not important, the solution is to use alert database tuanplus character set utf8 to change the encoding format
Command for viewing the mysql character set.
Including viewing the character set of the mysql database server, viewing the character set of the mysql database, the character set of the data table and field, and the character set supported by the
A customer asks us to check his internal network, which is used by company staff and customers. This is part of a big security evaluation. Although we have never used SQL injection to crack a network before, we are quite familiar with its general
According to the morgo suggestion suggested by morgo, I did some small tests on the queries and datasets mentioned in Impact of column types on MySQL JOIN performance, but I found another problem: response time (aka MySQL versions ).
The answer
To
Http://hi.baidu.com/luck001221/item/cb4462299f9ea79ab73263d2? Qq-pf-to = pcqq. group
1. Go to the mysql official website to download an odbc driver. Because MSsql has never been integrated with the mysql driver, this tool needs to be downloaded
Recently, I was suddenly very interested in MySQL connections. According to the thread keyword, I can find the following status:
show global status Variable_name Value Threads_cached Threads_connected Threads_created
Original http://www.111cn.net/database/mysql/58651.htm
In actual development, you may need to deploy multiple MYSQL instances on one server. We recommend that you use the MYSQL official solution mysqld_multi.
1. modify my. cnfFor example, a
Tool raw materials:
Mysql-5.0.37-win32
Network Disk: http://pan.baidu.com/s/1bnjCfTlInstallation Process
Run the installer. Next Step
Select "Custom" for Custom installation. Next Step
Here you can delete unnecessary installation, you can change
1. The database name, table name, and field name must be separated by lowercase letters and underlines.
A) MySQL has the configuration parameter lower_case_table_names, which cannot be changed dynamically. The default value is 0 in linux. That is,
Assume that there are host A and host B (Linux system). The IP address of host A is 1.2.3.4 (of course, it can also be dynamic), and the IP address of host B is 5.6.7.8. Both hosts are installed with PHP + Mysql. Now we are operating on the data on
How can I query the size of each table in the MySQL database?
MySQL has a database named information_schema, which has a TABLES Table. The main fields of this table are:
TABLE_SCHEMA: Database NameTABLE_NAME: Table NameENGINE: The storage ENGINE
1. For MyISAM tables, you can import a large amount of data quickly.
Alter table tbl_name disable keys; loading the dataALTER TABLE tbl_name enable keys;
These two commands enable or disable the update of non-unique indexes in the MyISAM table.
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