This topic provides a brief overview of query execution in Vertica. For detailed information about writing and executing queries, see the SQL Programmer's Guide.
Snapshot Isolation Mode
Vertica can run any SQL query in snapshot isolation mode in order to obtain the fastest possible execution. To be precise, snapshot isolation mode is actually a form of historical query. The syntax is:
AT EPOCH LATEST SELECT...
The command queries all data in the database up to but not including the current epoch without holding a lock or blocking write operations. This may cause the query to miss tuples loaded by other users up to (but no more than) a specific number of minutes before execution.
Historical Queries
Vertica can execute a query from a snapshot of the database taken at a specific date and time. The syntax is:
AT TIME 'timestamp' SELECT...
The command queries all data in the database up to and including the epoch representing the specified date and time without holding a lock or blocking write operations.
For this reason, the DELETE command in Vertica does not actually delete data; it simply marks tuples as deleted. The UPDATE command actually does an INSERT and a DELETE.
Parallel Query Execution
The query optimizer chooses the projections to use for any given incoming query and forms an optimized query plan for the ones chosen. The query plan that the optimizer produces is decomposed into "mini-plans" which are run at various nodes in parallel, interspersed with data movement operations. A local executor at each node runs its assigned mini-plan.