Author

Dingding Lu

Read more articles from this author
cockroachDB-UDFs-stored-procedures-thumbnail

Engineering

Product

How CockroachDB Implements UDFs and SPs

User-defined functions (UDFs) and stored procedures (SPs) allow users to define a set of queries that can be executed at the database by providing only the function or procedure name and any relevant parameters. They provide building blocks for users to compose complex queries, which makes applications less error prone since users don’t need to repeatedly provide the complex query. Another benefit of UDFs/SPs is that they enable better performance by moving more computation closer to the data. There are fewer round trips between the application and database to get the results the user wants.

Dingding Lu

August 27, 2024

Get started with CockroachDB

Start a free trial of CockroachDB or contact sales to learn more.