Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page categorizes all of the relational operators in CockroachDB's SQL implementation. It might be helpful to look at this to understand what all of the words mean in an EXPLAIN plan - and help you decode what's an efficient plan and what isn't.

SQL OperatorLogical Operator (planNode, how it appears in EXPLAIN)Physical Operator (DistSQL Processor, how it appears in EXPLAIN(DISTSQL))Notes
SELECTscanTableReader


revscanTableReader


index-joinIndexJoinerNecessary when an index being selected from doesn't contain all of the columns that the SELECT needs. Jumps back to the primary index to retrieve the other necessary data.
JOIN (inner, left/right/full outer, natural)joinHashJoinerLess efficient than merge join - has to buffer an entire side in memory.


MergeJoinerEfficient - can "stream rows" from each side.


JoinReader (lookup join)



ZigZagJoiner

subquery aka (SELECT... )subquery


DISTINCTdistinctDistinct



OrderedDistinct

ORDER BYsortsortAllProcessor



sortTopKProcessor



sortChunksProcessor

GROUP BYaggregateorderedAggregator



hashAggregator

LIMITlimitlimit

OFFSEToffsetoffset

OVER / PARTITION BYwindowwindower











  • No labels