• Storage architecture optimization (2)


    mysql.jpeg summary AboveWe have learned about how to analyze SQL through explain analysis. This paper will go deep into the relevant schemes of MySQL SQL optimization. Initialization script Create corresponding experiment tables and data in MySQL database through the following script. CREATE TABLE `user_info` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NOT NULL DEFAULT […]

  • Es basic usage


    Create index #Create index #”Dynamic”: “strict” = = = “it is not allowed to add fields dynamically. If a new field is encountered, an exception will be thrown. #”Dynamic”: “true” = = = “, allowing dynamic addition of new fields. This is the default #”Dynamic”: “false” = = = = ignore new fields. On the […]

  • MySQL create scheduled task


    1、 Event overview A feature event scheduler has been added in MySQL 5.1 (event scheduler), referred to as event for short. It can be used as a scheduled task scheduler to replace some tasks that can only be executed by the scheduled tasks of the operating system. In addition, it is worth mentioning that MySQL […]

  • [calculate] interpretation of Apache calculate verification process source code


    1. Core structure and concept The validator process provided by calculate is extremely complex, but in summary, it mainly does one thing,Verify whether the semantics of each sqlnode is correct by combining metadata, these semantics include: Verify whether the table name exists; Whether the selected column exists in the corresponding table and whether the matched […]

  • Unbelievable! SQL optimization finally killed “distinct”


    Unbelievable! SQL optimization finally killed “distinct” SQL optimized multi table joint query eliminates the “distinct” de duplication keyword When I submitted the code, the architect pointed out to me that there would be problems in writing this SQL. This is because sub queries are not supported when splitting databases and tables. Therefore, it is necessary […]

  • Regression basis MySQL syntax


    Ten thousand tall buildings rise from the ground 1、 Basic concepts Database terminology Database-A container (usually a file or group of files) that holds organized data. Data table-A structured list of a particular type of data. Schema-Information about the layout and properties of databases and tables. The schema defines how the data is stored in […]

  • MySQL schema Overview – > query execution process – > sql parsing order


    preface I’ve always wanted to know how an SQL statement is executed and the order in which it is executed, and then check and summarize the data of all parties, so I have the following blog post. This article will discuss the knowledge from MySQL overall architecture – > query execution process – > statement […]

  • SQL addition, deletion, modification and query — 19 database review and preparation


    Zucc   BK armanon   January 5, 2021 1. Select query (1) Basic format SELECT a FROM b WHERE c=d a: It can be * all columns or column names b: Table name queried c: Column name of where clause d: Data for where clause Example: the table name is data name ID sex Zhang […]

  • More effective c + + Notes (II)


    3、 Abnormal Clause 9: use destructor to avoid resource disclosure Encapsulating resources in objects can usually avoid resource leakage when exception occurs Clause 10: prevent resource disclosure in constructor C + + can only delete fully constructed objects. Only when the constructor of an object is completely run can the object be completely constructed. C […]

  • Mybatis common tags


    Dynamic SQL If conditional judgment <select id=”findActiveBlogLike” resultType=”Blog”> SELECT * FROM BLOG WHERE state = ‘ACTIVE’ <if test=”title != null”> AND title like #{title} </if> <if test=”author != null and author.name != null”> AND author_name like #{author.name} </if> </select> Choose (when, otherwise) condition query <select id=”findActiveBlogLike” resultType=”Blog”> SELECT * FROM BLOG WHERE state = ‘ACTIVE’ […]

  • MySQL explain execution plan – details


    What’s the use of explain WhenExplainAndSQLWhen used with statements,MySQLInformation about SQL execution from the optimizer is displayed. in other words,MySQLExplains how it will handle the statement, including how to join the table and what order to join the table. Loading order of tables sqlQuery type Which indexes may be used and which indexes are actually […]

  • Addition, deletion, modification and query of MySQL common command manual


    1、 Database operation Create database Syntax: CREATE DATABASE database_name; Delete database Be careful when deleting the database! Because after executing the delete command, all data will disappear. Syntax: DROP DATABASE database_name; Select database Syntax: USE database_name; 2、 Data table operation data type value type type size purpose TINYINT 1 byte Small integer value SMALLINT 2 […]