Query Execution in HP Vertica

SQL query is written against tables.In order to execute a query, the Vertica database generates a query plan. Query plan is the sequence of steps used to determine the execution path & resource cost for each step. Cost calculated at each step in a query plan is the estimation of resources used like:

  • Data distribution statistics
  • Disk space
  • Network bandwidth
  • CPU speed
  • Data segmentation across cluster

When you submit a query, the initiator chooses the projections to use, optimizes and plans the query execution. Planning and optimization are quick, requiring at most a few milliseconds.

Based on the projections chosen, the query plan that the optimizer produces is decomposed into “mini-plans.” These mini-plans are distributed to the other nodes, known as executors.The nodes process the mini-plans in parallel, interspersed with data movement operations.

The query execution proceeds with intermediate result sets (rows) flowing through network connections between the nodes as needed. In the final stages of executing a query plan, some wrap up work is done at the initiator, such as:

  • Combining results in a grouping operation
  • Merging multiple sorted partial result sets from all the executors
  • Formatting the results to return to the client

Some small queries, for example, queries on replicated dimension tables, can be executed locally. In these types of queries, the query planning avoids unnecessary network communication.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.