Insert performanceΒΆ

A INSERT INTO statement is processed as follows:

  • Parse the statement to create an abstract syntax tree
  • Do some basic semantic validation
  • Plan the operation
  • Execute the operation

CrateDB calculates the shard ID for every row to be inserted when executing the operation. Insert requests are then grouped and sent to the nodes that hold each primary shard.

There are a number of different ways to reduce the processing overhead of these steps. Either by eliminating needless repetition of steps, or by reducing the work needed to be done by one of the steps.

This section of the guide will show you how.

Table of contents