Jump to content

User talk:Jorgecarleitao

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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:

  1. Convert a query in a query language to a logical query plan
  2. Optimize the logical query plan
  3. Convert a logical query plan to a physical plan
  4. Optimize the physical query plan
  5. Execute the physical query plan (potentially distributing it across processes or a cluster)
  6. Return the result of the execution back to the interface

References

[edit]
  1. ^ Foundations of databases. ISBN 978-0201537710.