05 SQL statement execution process analysis
sql execution statement flow analysis
The whole processing flow is in exec_simple_query function. The code structure is as follows:
/*
* exec_simple_query
*
* Execute a "simple Query" protocol message.
*/
static void
exec_simple_query(const char *query_string)
{
...
//Original syntax tree acquisition
/*
* Do basic parsing of the quer ...
Added by teege84 on Sat, 04 Dec 2021 05:08:34 +0200
sql yoy calculation
Title: there are two tablesTable 1: Sales details
Table 2: product details
Demand: query the monthly sales in 2020 and the year-on-year comparison, and sort them in ascending order by month and year
Idea: step by step operation
Get monthly dataFirst, the extraction time and the sales of each month. To have sales, the two tables must b ...
Added by wtfsmd on Fri, 03 Dec 2021 10:55:18 +0200
What is DQL? Its meaning and common command analysis
Write in front: This article is my study record. If there are mistakes, please point them out and correct them immediately DDL, DQL, DML and DCL will be written in four parts, and DQL will be written in this article.
What is DQL?
DQL: data query language, used to query data
First, paste a table, and the following query contents will be us ...
Added by hanhao on Thu, 02 Dec 2021 22:23:28 +0200
[SQL Interview Question] Count the number of people in the online rush hour and the time line of the rush hour
1. Requirements
id start_time end_time
1001 2021-12-01 08:08:05 2021-12-01 19:02:07
1002 2021-12-01 08:15:07 2021-12-01 19:05:10
1003 2021-12-01 09:10:20 2021-12-01 21:02:07
1005 2021-12-01 09:26:05 2021-12-01 19:52:15
1006 2021-12-01 10:08:05 2021-12-01 22:05:06
1004 2021-12-01 10:20:07 2021-12-01 18 ...
Added by Salsaboy on Thu, 02 Dec 2021 19:17:43 +0200
Information technology think tank - big exam at the end of the month (come on, have a good fight)
[you in the future, will thank you for your efforts today] two questions a day, one difficult and one easy, and make a little progress every day, which may directly lead to the success of an interview or the easy completion of the work, so as to promote and raise salary, marry Bai Fumei, come on! 🍅 Venue: data warehouse exchange group ✖️ CSDN ...
Added by csueiras on Thu, 02 Dec 2021 02:54:51 +0200
PostgreSQL data access across database instances
prefacePostgresSQL is a single example multi database. Usually, a database instance contains multiple tablespaces and databases. One tablespace can store multiple databases. In this relationship, one tablespace can contain multiple databases, but a database can only belong to one tablespace and cannot be stored across tablespaces. Table space i ...
Added by lihman on Mon, 29 Nov 2021 17:31:45 +0200
Answer #11: what is the difference between char and varchar in MySQL
Answer #11: what is the difference between char and varchar in MySQL1. Experimental scenarioGreatSQL 8.0.25 InnoDB2. Experimental test2.1 differencesparametercharvarcharIs the length variableFixed lengthLengthenstorage capacity 0 ~ 2550 ~ 65,5352.2 construction test tableCREATE TABLE vc (v VARCHAR(4), c CHAR(4));2.3 test without exceeding the s ...
Added by benphp on Mon, 29 Nov 2021 08:47:03 +0200
SQL training camp -- Task06: comprehensive exercises - 10 classic questions
This note is the learning content of Alibaba cloud Tianchi Longzhu plan SQL training camp. The link is: https://tianchi.aliyun.com/specials/promotion/aicampsql
preface
This note is the learning content of Alibaba cloud Tianchi Longzhu plan SQL training camp. The link is: https://tianchi.aliyun.com/specials/promotion/aicampsql
Dataset ...
Added by deregular on Sun, 28 Nov 2021 15:28:26 +0200
Java ★ soul torture: do you want to write unit tests or not? How to conduct unit tests correctly?
Why write unit tests
When talking about test cases, many people's first reaction is that our company's tests will write test cases, and I will also use postman or swagger for code self-test. Should we write unit test cases?
Referring to Alibaba's development manual, rule 8 (the basic goal of unit testing: the statement coverage rate should re ...
Added by kmarsh on Wed, 24 Nov 2021 07:14:21 +0200
SEQUENCE Principle of TDDL in Distributed
Create a sequence table in the database to record the maximum id currently occupied. Each client host takes an id interval (for example, 1000-2000) to cache locally and updates the id maximum record in the sequence table. Client hosts take different id intervals, run out and retrieve, and use the optimistic locking mechanism to control concurre ...
Added by slushpuppie on Sun, 21 Nov 2021 19:35:41 +0200