Student table1 information and course scores for students with "01" courses higher than "02"SelectStudent.*, S_score fromStudent,scorewherec_id= on andscore.s_id=student.s_id andscore.s_idinch(Selects1.s_id fromScore S1,score S2wheres1.c_id= on
See an article in the public number said very well, meaning that Daniel in the trial of various programs may not have the divine prediction and screening abilityJust when you usually test a situation, the great God has tested several scenarios,
1, MySQL logic architecture, upper client-----"Connection/threading------" Parser-----Optimizer-----"Storage engine, if the parser has generated query cache, then connection/threading may also be directly to the query cache, return results, the
The MySQL default MyISAM storage engine, does not support thing handling, and the InnoDB storage Engine provides transactional security with commit, rollback, and crash resiliency. But compared to the MyISAM storage engine, InnoDB writes are less
$arr =array ("A", "B", "1", "2");Assuming the table name is acticle and the field is isread, the table is as follows
Id
Isread
1
1,3,4
2
A
3
3
We take the
1) Installation DependentYum Search Libaio # Retrieving relevant informationYum Install Libaio # Installation Dependency Package2) Check if MySQL is installedYum List Installed | grep MySQLIf so, uninstall all first, the command is as follows:Yum-y
MySQL indexing feature
1. Role of the Index
Greatly accelerate the retrieval speed of data and increase the efficiency of query
Reduce disk I/O costs
Ensuring uniqueness of data records
Enables faster execution of SQL
6. Use Exists,not exists clauses reasonably. As shown below:
1.SELECT SUM (T1. C1) from the T1 where (SELECT COUNT (*) from T2 where t2.c2=t1.c2>0) 2.SELECT SUM (T1. C1) from T1where EXISTS (SELECT * from T2 WHERE T2. C2=t1. C2) both
1. Index classification1. General Index2. Unique index3. Primary KEY index4. Foreign KEY Index2. Normal index1. Rules of Use1. You can have more than one index field in a table2, the value of the field can be duplicated, or it can be a null value3.
1, from the library only to open the Log-bin function, do not add log-slave-updates parameters, the data from the library copied from the main library will not be written to the Log-bin log file.2. When writing data directly from the library, it is
1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily.Because the MySQL database was completely password-protected during the reset of the root password for MySQL?Status, other users can
1, MySQL database service: MySQL software, mysql instance and MySQL database these parts of the general term, sometimes referred to as MySQL service2. mysql instance: Refers to the mysqld process3, MySQL database: is a collection of a series of
Some optimizations need to be made when the table has a large amount of data:1. Index the query criteria field;2. The index field cannot have a null value, and the index is invalidated when a null value occurs;3. The query statement appears not
Naming rules: Table name _ Field name1. Fields that need to be indexed, in the Where condition2. Fields with low data need not be indexed3, if the Where condition is an OR relationship, index does not work4, accord with the left
In the MARIADB environment introduced yesterday,Turn on MySQL in the two host m1,m2, respectively,First Enter VI/ETC/MY.CNF/To see what's in "mysqld":The server_id in the configuration file is to be modified, corresponding to the serial number of
Command line connection
The main use of command operation in the work, requires proficiency in writing
Open terminal, Run command
mysql -uroot -p回车后输入密码,当前设置的密码为mysql
Sign Out
quit 和 exit或ctrl+d
After
The debugging of the lock is divided into two parts, one is the debugging of the server level lock. The second is the debug of the lock at the storage engine levelDebugging for server-level locks:The types of server-level locks are table locks,
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