MysqlExplain explains in detail when the query may use the index union index action rule id select_type table type possible_keys key key_len ref Extra

preface sql tuning is very common in actual development, especially when the server is under pressure, it is necessary to optimize the time-consuming and commonly used sql to improve the high availability of the server. The explain tool will be used during tuning. This chapter will use explain to see how powerful it is. 1, EXPLAIN Us ...

Posted by dreado on Mon, 04 Oct 2021 02:35:58 +0200

MySQL Data Add Statement

MySQL Data Add Statement After the database and tables have been created successfully, you need to insert data into the tables in the database. In MySQL, you can use INSERT statements to insert one or more rows of tuple data into tables that already exist in the database. Basic Grammar The INSERT statement has two syntax forms, INSERT ...

Posted by discostudio on Sun, 03 Oct 2021 19:01:33 +0200

MySQL SQL optimization explain analysis

explain analysis execution plan You can use the EXPLAIN or DESC command to obtain information about how MySQL executes the SELECT statement, including how tables are connected and the order of connection during the execution of the SELECT statement. Execution plan of query SQL statement: explain select * from tb_item where id = 1;   ...

Posted by xtian on Fri, 01 Oct 2021 20:48:40 +0200

drawio.io secondary development pit record

drawio.io secondary development tutorial Secondary development basic data Import ide Add local and oss storage Pure front-end function Introduction to various modification positions Modify code Prepare environment git clone https://github.com/jgraph/drawio.git cd drawid-dev\src\main\webapp python -m http.server 8081 The project u ...

Posted by holladb on Fri, 01 Oct 2021 20:27:11 +0200

Operation of SQL database (job)

Job requirements: 1. Browse electronic courseware and notes. (Browse without submitting) 2. Complete textbook examples 2.6, 2.8, 2.10, 2.11, 2.13. 3. Complete the textbook P280 experiment 1, experiment 2. 4. Complete the contents of the following experiment topics. 5. Complete the third exercise on page P23 of the textbook and convert it into a ...

Posted by DeadlySin3 on Thu, 30 Sep 2021 18:01:38 +0200

[leetcode SQL] game play analysis Ⅰ - Ⅳ

First, give the Activity table used by the four questions: +--------------+---------+ | Column Name | Type | +--------------+---------+ | player_id | int | | device_id | int | | event_date | date | | games_played | int | +--------------+---------+ The primary key of the table is (player_id, event_date). This table s ...

Posted by NerdConcepts on Wed, 29 Sep 2021 21:56:00 +0200

Using mybatis plug-in to develop dynamic change sql

1. Business background requirements At present, the company where the landlord is located uses the same set of database with the advance environment. The purpose of this is to check the real situation on the acceptance line of the advance environment. However, several configuration tables need to be changed separately in the advance environmen ...

Posted by frih on Sun, 26 Sep 2021 11:43:29 +0200

MyBatis - many to one & one to many

SQL processing In practical application, we need not only simple single table query, but also simultaneous query information of other tables by using MyBatis. To solve this problem, a more advanced result mapping is required. preparation in advance SQL preparation We need a student table and a teacher table. The teacher's primary key is id ...

Posted by mcguinkc on Sun, 26 Sep 2021 02:00:29 +0200

MYSQL transactions

mysql transaction In MySQL, transaction is actually the smallest and indivisible unit of work. Transactions can ensure the integrity of a business. Such as bank transfer a-> -100 update user set money = money-100 where name'a'; b-> +100 updata user set money=money +100 where name='b'; In the actual program. If only one ...

Posted by newbiehacker on Sat, 25 Sep 2021 06:25:24 +0200

In September, datawhale teamed up to learn the advanced operation of task05SQL

In September, datawhale teamed up to learn task05 advanced SQL operations 1, Window function 1. Concept, basic usage Window function (OLAP function) Online AnalyticalProcessingReal time analysis and processing of database Window function allows us to selectively summarize, calculate and sort some data Conventional SELECT statemen ...

Posted by KenGR on Thu, 23 Sep 2021 16:51:52 +0200