Best Practices

Posts Tagged ‘Best Practices’

Stonebraker Live! – Tonight!

Register nowto join us via live streaming!

Can’t make it to Santa Clara tonight? That doesn’t mean you can’t attend Stonebraker Live!

Join us via live stream at 6:30 p.m. Pacific to hear from database legend Mike Stonebraker, as well as VoltDB’s VP of Market Strategy, Mark Hydar, and Co-founder, Scott Jarr.… Read more

 

Scaling with VoltDB: The Clustered Database

This is part 2 (of 2) of my Programming VoltDB – Easy, Flexible and Ultra-fast series. Blog post, part 1, showed how to build a VoltDB application using ad hoc queries and achieving thousands of transactions a second. It also showed how converting that logic to use VoltDB stored procedures allowed you to parallelize query execution and achieve 100,000+ transactions a second on a single node. In this blog post I’ll talk about scaling beyond 100,000 transactions per second by creating a VoltDB clustered database.

There are primarily two reasons why you would want to run VoltDB as a … Read more

 

Simplify Your Stored Procedure Logic with Expectations

John Hugg was talking with me today about a way to reduce the complexity of error checking in a stored procedure and how rarely it is used. VoltDB’s stored procedures let you set “expectations” on each SQL statement. Those expectations can eliminate several lines of code leading to shorter, readable and more reliable stored procedures.

Consider the following sample:

Example.DDL

LoginProc1.java

LoginProc2.java

LoginProc1 checks for a row count and returns either a 0 or a 1 if the username and password combination could not be found. LoginProc2 sets an expectation that the results of voltExecuteSQL() will return exactly one … Read more

 

Upserts in VoltDB

Upserts in VoltDB

The idea behind an upsert is that you try an update or an insert query first and if it fails, you then do the other query.
Why do an upsert? Upserts tend to be very fast in traditional databases because they can execute in as little as one query or as many as two. Consequently, a good upsert strategy has only two defined queries (insert and update) rather than three (insert, update and select). More importantly, “upsert” itself can be a keyword in which the database understands that it is responsible for figuring out whether to update … Read more