We are migrating from Oracle to VoltDB, should we put all the business logic (the migrated stored procedures) inside the database? Is that the best practice for maximum performance?
1 Answers
I work at VoltDB. There isn't one right answer to your question, it would depend on the particular schema and procedures, but I can explain a little about the stored procedures in VoltDB and differences with Oracle.
First, VoltDB is not a general-purpose database like Oracle, but was specially-designed to provide high performance and scalability for OLTP and "Fast Data" workloads. Typically these workloads involve discrete transactions on small set of records, but which come at rates of thousands to millions per second. The use cases range from providing real-time analytics on fast-moving data sets, to transforming and enriching streaming data, to providing low-latency responses that often involve a data-driven decision to high scale interactive applications.
The procedures in VoltDB are typically focused on applying atomic changes to small sets of records, and they often are used to make event-driven changes in real-time vs. running batch processes on data in bulk as you often see in Oracle. VoltDB automatically generates CRUD-style procedures for each table in the schema now including UPSERT. You can declare single-SQL-statement procedures in the DDL. Procedures that include multiple SQL statements and control flow logic are written as simple java classes that run on the database. VoltDB also supports Ad-Hoc SQL statements (ANSI SQL-92 compatible) sent directly from a client, using either a native language client library or the JDBC or ODBC drivers, or over the embedded HTTP-JSON interface.
If the stored procedures in Oracle are for OLTP operations then they may translate somewhat directly into VoltDB procedures. If they are performing batch operations on data in bulk, then often these processes may be redesigned to be event-driven real-time processes that would produce the same result incrementally. If they still have to be done as a long-running batch, typically they would be broken into separate more discrete procedures driven by a client process.

- 1,482
- 12
- 11