When sending a short message on the site today, you may encounter a function that is to perform a wildcard search for an account.
The following situations may be used for search:
Sunzhongshan string searches without wildcards
Sun * starts with sun
1. Delete mysql
1 sudo apt-get autoremove -- purge mysql-server-5.02 sudo apt-get remove mysql-server3 sudo apt-get autoremove mysql-server4 sudo apt-get remove mysql-common (very important)In fact, some of the above are redundant. We recommend that
Select * from account where userName like 'ad % ';
Select * from account where userName> = 'ad' and userName
/*
The results of these two queries are the same, and the efficiency seems to be similar. No specific efficiency test is conducted.
Today, I found that I forgot to install the largest partition in the data directory of the master-slave mysql Server Load balancer and directly mounted it to the root partition. I have used root partition 95% below df, as long as the migration is
Lexical Analysis MYSQLlex
After the client sends an SQL statement to the server, the server first performs lexical analysis, and then performs syntax analysis and semantic analysis to construct an execution tree and generate an execution plan.
MySQL is an open source relational database management system, the developer is MySQL AB in Sweden and is now part of Oracle. Because of its high performance, low cost, and high reliability, MySQL has become the most popular open-source database
In some cases, the or condition can avoid full table scan.
1. If the where statement contains the or condition, the myisam table can use indexes, but innodb does not.
1) myisam table:
Create table if not exists 'A '(
'Id' int (1) not null AUTO_
I. Architecture mode (dual master and zero slave) ========================================================== ====================================== ========================================================== ======================================---
In general, there are two sorting methods for order by in MySQL. One is to use an ordered index to obtain ordered data, and the other is to use the corresponding sorting algorithm, sort the obtained data in the memory.
The following describes two
The time it takes to INSERT a record in Mysql-optimized accelerated INSERT statements is determined by the following factors, and the number indicates the proportion of the impact: Connection: (3) Send query to server: (2) Resolution query:
1. commands for starting mysql in linux:Mysqladmin start/Ect/init. d/mysql start (the installation path of mysql is earlier)2. Command for restarting mysql in linux:Mysqladmin restart/Ect/init. d/mysql restart (the installation path of mysql is
I. MYSQL Database concept1. Database Management System (DBMS) is a software used to manage and manipulate data, including SQL server, mysql, access, oracle, and other database management systems.2. database application system (DBAS) is a system
When a data table contains a large amount of data, you only need to check the values of some of the fields, instead of all the data, you only need to check a few rows. At this time, you can use limit
For example:
1. select * from tags limit 4; it is
The requirements are as follows: I have a table with the basic data, and a field is the management number. My goal is to first query the latest management number, generate a new management number according to the rules, and then insert the new data
The first step is to start from remote connection failure, although indirectly encountering some problems. Find out the problem and summarize it. If the problem persists or has been resolved, I hope to reply to it! Remote connection error 1130 some
Xtrabackup is a tool used to back up InnoDB data. It supports online Hot Backup (data read/write is not affected during Backup) and is a good alternative to InnoDB Hotbackup. Xtrabackup has two main tools: xtrabackup and innobackupex. xtrabackup can
MySQL _ after group_distinct _ How To Get The total number of records (number of rows) Problem: After using group or distinct, how to get the total number of records of the query results? -- Required, do not use subquery analysis: If there is no
1. Maintenance of the root user password: After MySQL is installed, MySQL automatically provides a root user without a password. To ensure security, set the password for the root user: # mysqladmin-u root password 123 (123 is the password, which can
Environment: MySQL Server 5.1 + Navicat for Mysql 8.2 problem: a 121 error occurs when the foreign key is deleted. Solution: Change the foreign key name to another name. For details about the error message www.2cto.com, refer to: error121. This is 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.