DEV Community

Maruf13
Maruf13

Posted on

1

PostgreSQL Query Processing

In PostgreSQL, the parallel query uses multiple background worker processes. A backend process basically handles all queries issued by the connected client. This backend consists of five subsystems, as shown below:

Query image processing

1. Parser:

The parser generates a parse tree from an SQL statement in plain text.

2. Analyzer:

The analyzer/analyser carries out a semantic analysis of a parse tree and generates a query tree.

3. Rewriter:

The rewriter transforms a query tree using the rules stored in the rule system if such rules exist.

4. Planner:

The planner generates the plan tree that can most effectively be executed from the query tree.

5. Executor:

The executor executes the query via accessing the tables and indexes in the order that was created by the plan tree.

✔️ References:

  1. https://age.apache.org/
  2. https://github.com/apache/age
  3. https://www.interdb.jp/pg/index.html

Tiugo image

Fast, Lean, and Fully Extensible

CKEditor 5 is built for developers who value flexibility and speed. Pick the features that matter, drop the ones that don’t and enjoy a high-performance WYSIWYG that fits into your workflow

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into this insightful write-up, celebrated within the collaborative DEV Community. Developers at any stage are invited to contribute and elevate our shared skills.

A simple "thank you" can boost someone’s spirits—leave your kudos in the comments!

On DEV, exchanging ideas fuels progress and deepens our connections. If this post helped you, a brief note of thanks goes a long way.

Okay