User talk:Jorgecarleitao
Query Engine is a component or application that executes queries (written in a query language) against data. A query engine is a necessary component of a relational database and data warehouse, and can also be part of a standalone application.
Description
[edit]In a relational database, data warehouse, or other storage, data are typically stored[1]:
- in a data format that is not human readable.
- in a data model that does not answer every question a user may have.
Therefore, systems operating with data expose interfaces (such as an SQL command-line interface or application programming interface) to interact with this data, typically with a query language. A query engine is a component that translates and executes a query against the underlying data.
A query engine may be part of a relational database (such as Postgres or SQLLite), a data warehouse (such as Snowflake, Amazon Redshift, BigQuery, Databricks), or as a standalone application (such as Apache Spark and duckDB).
Function
[edit]Query engines operate by converting a query in a query language to a result of that query against data. Within this operation, a query engine usually performs the following steps:
- Convert a query in a query language to a logical query plan
- Optimize the logical query plan
- Convert a logical query plan to a physical plan
- Optimize the physical query plan
- Execute the physical query plan (potentially distributing it across processes or a cluster)
- Return the result of the execution back to the interface
References
[edit]- ^ Foundations of databases. ISBN 978-0201537710.