GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltdb.com — 2.2. Designing the Stored Procedures

  • Volt Active Data
  • Developer Hub
  • Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Administrator's Guide
    • Volt Kubernetes Administrator's Guide
    • VoltDB Quick Reference
  • VoltDB V16
    • VoltDB V16
    • VoltDB V15.3 LTS
    • VoltDB V14.3 LTS
    • VoltDB V13.3 LTS
    • VoltDB V12.3 LTS
    • VoltDB V11.4
    • VoltDB V10.2
    • VoltDB V9.3
2.2. Designing the Stored Procedures

Planning Guide

  • Preface▶
    • 1. Organization of this Manual
    • 2. Other Resources
  • 1. The Planning Process
  • 2. Proof of Concept▶
    • 2.1. Effective Partitioning
    • 2.2. Designing the Stored Procedures
  • 3. Choosing Hardware▶
    • 3.1. The Dimensions of Hardware Sizing
    • 3.2. Sizing for Throughput
    • 3.3. Sizing for Capacity
    • 3.4. Sizing for Durability
  • 4. Sizing Memory▶
    • 4.1. Planning for Database Capacity
      • 4.1.1. Sizing Database Tables
      • 4.1.2. Sizing Database Indexes
      • 4.1.3. An Example of Database Sizing
    • 4.2. Distributing Data in a Cluster
      • 4.2.1. Data Memory Usage in Clusters
      • 4.2.2. Memory Requirements for High Availability (K-Safety)
    • 4.3. Planning for the Server Process (Java Heap Size)
      • 4.3.1. Attributes that Affect Heap Size
      • 4.3.2. Guidelines for Determining Java Heap Size
  • 5. Benchmarking▶
    • 5.1. Benchmarking for Performance
      • 5.1.1. Designing Your Benchmark Application
      • 5.1.2. How to Measure Throughput
      • 5.1.3. How to Measure Latency
    • 5.2. Determining Sites Per Host

2.2. Designing the Stored Procedures

Designing the schema and transactions to be single-partitioned is one thing. It is equally important to make sure that the stored procedures operate in a way that lets VoltDB do its job effectively.

The first step is to write the transactions as stored procedures that are loaded into the schema. Do not write critical transactions as ad hoc queries to the database. VoltDB provides the @AdHoc system procedure for executing arbitrary SQL queries, which can be helpful when building early prototypes to test queries or occasionally validate the content of the database. But @AdHoc queries often run as multi-partitioned transactions and, therefore, should not be used for critical or repetitive transactions.

The next step is to ensure that single-partitioned stored procedures are correctly identified as such in the schema using the PARTITION ON clause in the CREATE PROCEDURE statement and specifying the appropriate partitioning column.

Finally, when designing for maximum throughput, use asynchronous calls to invoke the stored procedures from within the POC application. Asynchronous calls allow VoltDB to queue the transactions (and their responses), avoiding any delays between when a transaction completes, the results are returned to the POC application, and the next procedure is invoked.

Chapter 5, Benchmarking later in this book provides additional suggestions for effectively designing and testing proof of concept applications.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.