All types of SingleStoreDB extensions are optimized for high performance. Once created, each is compiled directly to machine code using SingleStoreDB’s unique code generation techniques. This process ensures that subsequent execution of a procedure or function is highly performant, as a node can execute the function without requiring interpretation or a multi-step process of intermediate language compilation.
Additionally, stored procedures and table variables benefit from further optimizations for SingleStoreDB’s distributed execution. SQL statements within stored procedures operate with full parallelism across the SingleStoreDB cluster.
QUERY type variables are processed with a lazy evaluation strategy. The underlying
SELECT statement associated with a
QUERY type variable is only executed when the rows of the variable need to be returned. UDFs are also processed in parallel on different data partitions.