05 SQL statement execution process analysis 2 - query logic optimization
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 ...
Posted by scottlowe on Sat, 04 Dec 2021 17:11:50 -0800
05 SQL statement execution process analysis 3 query physical optimization
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 ...
Posted by Elhombrebala on Sat, 04 Dec 2021 15:37:27 -0800
Syntax analysis of 04-PG database
Syntax analysis of PG database
1, Lexical analysis of gram.y
The lexical parser is explained in the src\backend\parser\gram.y file.
%{
Declarations
%}
Definitions
%%
Productions
%%
User subroutines
In the lexical parser, we talked about the knowledge of. y files. This article mainly explains how to use the lexical parser in PG.
1,Declarat ...
Posted by Imperialdata on Fri, 03 Dec 2021 20:23:42 -0800
postgreSQL source code analysis -- establishment and use of index -- Hash index
2021SC@SDUSC
catalogue
Hash index
In addition to using B-Tree index, postgreSQL can also use hash index. Hash index has faster query speed. This article mainly explains the principle of hash index, compares it with B-Tree, and analyzes the relevant data structure of hash index in the source code.
Hash indexing principle
Hash table
The ...
Posted by incubi on Sun, 28 Nov 2021 18:57:01 -0800
Tool | one SQL to realize PostgreSQL data retrieval
Author: Zhang Lianzhuang, PostgreSQL R & D EngineerHe has been engaged in the development of PostgreSQL database kernel for many years and has a very in-depth research on citus.Recovering lost data quickly is an important functional requirement of the database. It is generally recommended to use the tools recommended by the official. For op ...
Posted by broann on Tue, 23 Nov 2021 23:08:08 -0800
CockroachDB integrates a simple application of Springboot
preface
The company recently switched from Mysql to CockroachDB, so some problems encountered during this period are recorded here
1 development environment
CockroachDB version V20.2.3
maven needs to introduce dependencies
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifact ...
Posted by m@ndio on Tue, 23 Nov 2021 07:41:11 -0800
Installing Postgresql on CentOS7
1. Select installation package
The source file directory can be found in the official of postgresql. The address is as follows: Official website address of postgresql , select the corresponding version for installation according to the project requirements, as shown in the figure below:
2. Installation
① Unzip the installation package First, ...
Posted by iknownothing on Fri, 19 Nov 2021 03:54:03 -0800
Teach you to use SQL for data analysis
Absrtact: using SQL as the entry of data query and analysis is an idea of data full stack.
This article is shared from Huawei cloud community< How to use SQL to analyze data? >, author: zuozewei.
preface
We process user data in real time through OLTP (online transaction processing) system, and we also need to analyze them in OLAP ( ...
Posted by neutra on Wed, 17 Nov 2021 23:07:19 -0800
[PostgreSQL] the idea and scheme to solve the problem that setting fetchsize in PostgreSQL can not flow query
preface
Recently, a customer of the company used PostgreSql to store data. In the export function, it was found that in the case of big data, the memory will grow until it overflows. Because the fetchSize is set for stream query in the export function, there will be no memory overflow. Then the investigation found that all the data were obtain ...
Posted by kamurj on Sat, 06 Nov 2021 10:57:09 -0700
Docker configures the master-slave environment of PostgreSQL13
Docker configures the master-slave environment of PostgreSQL13
preface
PostgreSQL database supports a variety of replication solutions to build high availability, scalable and fault-tolerant applications, one of which is pre write log (WAL) delivery. This solution allows the use of file based log shipping or streaming replication, or, wher ...
Posted by Potatis on Sun, 24 Oct 2021 19:20:23 -0700