# ColumnStore Query Processing

Clients issue a query to the MariaDB Server, which has the ColumnStore storage engine installed. MariaDB Server parses the SQL, identifies the involved ColumnStore tables, and creates an initial logical query execution plan.

\
Using the ColumnStore storage engine interface (`ha_columnstore`), MariaDB Server converts involved table references into ColumnStore internal objects. These are then handed off to the `ExeMgr`, which is responsible for managing and orchestrating query execution across the cluster.

The `ExeMgr` analyzes the query plan and translates it into a distributed ColumnStore execution plan. It determines the necessary query steps and the execution order, including any required parallelization.

The `ExeMgr` then references the extent map to identify which PrimProc instances hold the relevant data segments. It applies extent elimination to exclude any PrimProc nodes whose extents do not match the query’s filter criteria.

The `ExeMgr` dispatches commands to the selected PrimProc instances to perform data block I/O operations.

The PrimProc components perform operations such as

* Predicate filtering
* Join processing
* Initial aggregation
* Data retrieval from local disk or external storage (e.g., S3 or cloud object storage)

They then return intermediate result sets to the ExeMgr.

The `ExeMgr` handles:

* Final-stage aggregation
* Window function evaluation
* Result-set sorting and shaping

The completed result set is returned to the MariaDB Server, which performs any remaining SQL operations like `ORDER BY`, `LIMIT`, or computed expressions in the `SELECT` list.

\
Finally, the MariaDB Server returns the result set to the client.

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/analytics/mariadb-columnstore/architecture/columnstore-query-processing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
