Book Contents

Book Index

Next Topic

Home

Using the Transaction Model

Vertica supports conventional SQL transactions with standard ACID properties. Specifically:

Session-Scoped Isolation Levels

Vertica supports a subset of the standard SQL isolation levels and access modes for a user session as described in SERIALIZABLE Isolation and READ COMMITTED Isolation. These modes determine what data a transaction can access when other transactions are running concurrently. You can change the default isolation level for a user session using the SET SESSION CHARACTERISTICS command.

Session-scoped isolation levels do not apply to temporary tables, which are scoped to the current transaction. They do not take table locks, are only visible to one user, and their contents are always visible regardless of advancing epochs and COMMITs.

Query-Scoped Isolation Levels

Snapshot Isolation (historical queries) are part of the Vertica query syntax:

[ AT EPOCH LATEST ] | [ AT TIME 'timestamp' ] SELECT ...

AT EPOCH LATEST allows queries to access all historical data up to but not including the current epoch . It does not hold locks and does not block write operations. This provides a profound query performance advantage. It does not apply to temporary tables.

Automatic Rollback

When an error occurs or a user session is disconnected, the current transaction automatically rolls back. This behavior may be different from other databases.

In This Chapter

Snapshot Isolation

SERIALIZABLE Isolation

READ COMMITTED Isolation