MySQL private dishes -- MySQL statement | alias | subquery | connection query | associative set | sorting | advanced statement|

1. Prepare table information 2.MySQL advanced statement 2.1 alias Field alias, table alias Syntax: SELECT "table alias" "Field 1" [AS] "field alias" FROM "table name" [AS] "table alias"; Example: select A.age 'Age' from REGION A order by Age asc; 2.2 sub query: join table Insert ...

Added by aQ on Tue, 25 Jan 2022 15:29:32 +0200

Create and manage tables

1, Basic knowledge 1.1. A data storage procedure   the first step in processing data when storing data. Only by storing the data correctly can we process and analyze it effectively. In mysql, a complete data storage process has four steps: creating a database, confirming fields, creating a data table, and inserting data. From the perspecti ...

Added by jwaqa1 on Tue, 25 Jan 2022 06:22:49 +0200

Advanced MySQL (SQL optimization, index optimization, locking mechanism, master-slave replication)

0 storage engine introduction myisam storage: if the table does not have high transaction requirements and is mainly query and addition, we consider using myisam storage engine, such as posting table and reply table in bbs Regular defragmentation is required (because the deleted data still exists): optimize table_ name; InnoDB storage: ...

Added by Spikey on Tue, 25 Jan 2022 01:19:41 +0200

Transaction and four characteristics

What is a transaction? Database transaction refers to a series of operations performed as a single logical unit of work, either completely or not. To put it simply: a transaction is to bind a pile of SQL statements (usually add, delete and modify operations) together for execution. Either all of them are executed successfully or all of them f ...

Added by munchy on Mon, 24 Jan 2022 20:57:41 +0200

Database index failure

Database index failure Database index MySQL optimization (I) MySQL optimization (II) MySQL optimization (III) MySQL optimization (IV) Common cases of index failure or keyword in sql statement;The left column field is not used in the composite index;like starts with%;Type conversion required;There are operations in the index column in w ...

Added by petersen313 on Sun, 23 Jan 2022 13:47:54 +0200

Interview big factory blood abuse interviewers during the day and teach little sister SQL injection at night! It's exciting!

The following picture shows the little sister pointed by the blogger! Hee hee! 1, What is sql injection SQL injection is one of the more common network attacks. It does not use the BUG of the operating system to realize the attack, but for the negligence of programmers when writing, it realizes no account login and even tampers with the ...

Added by cosmos33 on Sun, 23 Jan 2022 12:06:10 +0200

Mybatis source code analysis Mapper file registration and binding

Mybatis is a "sql oriented" persistence layer framework. It can dynamically assemble sql, which is extremely flexible. At the same time, it avoids almost all JDBC code, manually setting parameters and obtaining result sets. Its plug-in mechanism allows intercepting calls at a certain point during the execution of mapped statements, an ...

Added by TimC on Sun, 23 Jan 2022 10:49:22 +0200

MySQL database advanced operations

Data table advanced operations Preparation: install MySQL database create database CLASS; use CLASS; create table TEST (id int not null,name char(20) not null,cardid varchar(18) not null unique key,primary key (id)); insert into TEST(id,name,cardid) values (1,'zhangsan','123123'); insert into TEST(id,name,cardid) values (2,'lisi','12 ...

Added by roxki on Sat, 22 Jan 2022 20:07:08 +0200

TPC-H table structure and 22 SQL query statements

Introduction to TPC and TPC-HAccording to TPC official website( http://tpc.org )TPC is a non-profit company, focusing on developing data centric benchmark standards and disseminating objective and verifiable data to the industry. TPC releases TPC-C, TPC-H and TPC-DS, which are widely used in the industry. TPC-C is the test benchmark for OLTP, w ...

Added by sitestem on Sat, 22 Jan 2022 03:09:07 +0200

Wan a #20, how to filter data in index push down

The original content of GreatSQL community cannot be used without authorization. Please contact Xiaobian and indicate the source for reprint.Experimental environmentGreatSQL 8.0.25 InnoDB1. Introduction to index push down1. Index Condition Pushdown is short for ICP.2.MySQL5. Version 6 introduces the function for optimizing queries.3. Under some ...

Added by marc2000 on Wed, 19 Jan 2022 22:37:52 +0200