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:
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.
Top comments (0)