Vertica Blog

Vertica Blog


Vintage businessman concept pointing on the wall wearing futuristic helmet at office

Hash Function Result Depends on Data Type and Sometimes Size

The Vertica HASH function calculates a hash value over the function arguments, producing a value in the range 0
Helpful Tips in blue text with magnifying glass

Loading Data Stored in Scientific Notation to an Integer Column

Scientific notation is a way of expressing numbers that are too big or too small to be conveniently written in decimal form. Vertica can display numbers in scientific notation in decimal form with ease. That is, unless the value is a string! You first have to convert the VARCHAR to a NUMERIC and then to...
Construction site crane building a blue SQL 3D text.

Creating Vertica Functions in Third Party Tools

Third party SQL client tools that connect to Vertica often provide a SQL command window where you can type SQL commands and view the results. Most of these tools’ SQL command windows support issuing multiple commands in a single SQL block, using the semicolon as the command delimiter. Here is an example in DbVisualizer: The...
Red and blue square dots fly from scattered into two neat rows arranged by color.

Auto-Projection Column Sort Order

Auto-projections are superprojections that Vertica automatically generates for tables, both temporary and persistent. Vertica uses the current value of the MaxAutoSortColumns configuration parameter to determine which table columns are included in the auto-projection sort order. Helpful Links: Have fun!
Hand with suit cuff flips shiny gold coin

Coin Flip User Defined SQL Function

In the past when my wife and I couldn’t decide which of two restaurants to go to grab dinner, we opened the Coin Flip app on one of our phones to let it decide. Now I let Vertica choose for us via a simple User Defined SQL Function! Helpful Links: Have fun!
Quick Tip - blue button

Non-DBADMIN Access to System Tables (Table by Table)

The DBADMIN can assign a delegate the SYSMONITOR role to grant full access to system tables without granting full DBADMIN access. The SYSMONITOR role applies to all tables that have the flag IS_MONITORABLE set to true in the SYSTEM_TABLES system table. What if I want a non-DBADMIN user to have full access to only a...
Compass rose with true north pointing to "Helpful Tips" text

Tracking VBR Invocations

The Vertica Backup and Recovery tool (vbr) allows you to back up and restore either the full database, or one or more schema and table objects of interest. You can also copy a cluster and list backups you created previously. You can view vbr invocations by querying the DC_VBR_INVOCATIONS data collector table! Helpful Links:
Vintage businessman concept wearing futuristic helmet at office

Track License Usage Over Time

The LICENSE_AUDITS system table lists the results of Vertica's license automatic compliance audits. You can query it to track your Vertica license usage over time! Looks like I’m going to need add some new Vertica license soon! Helpful Links: Have fun!
Tips and Tricks Orange Button

A Quick Way to View the Current and Ancient History Mark Epochs

The MANAGE_EPOCH function can be called to quickly display the Current Epoch (CE) and Ancient History Mark (AHM) Epochs! Helpful Links: Have fun!
Helpful Tips message on post-it note

Enable All Granted Roles on Login

You can automatically enable roles for users in two ways: Enable roles for individual users on login (either with the SET ROLE command or default roles). Enable all roles for all users on login (at the database level via the EnableAllRolesOnLogin parameter). The second option is great (and easy) if you want all users to...
Business card that says Expert Tips,

Generate DDL for Changed Configuration Parameters

The CONFIGURATION_CHANGES system table records the change history of system configuration parameters. If you want to apply all of the changes to a different Vertica database, you can generate the necessary DDL commands to do that! Helpful Links: Have fun!
Copy data

Generating Recursive COPY Commands

Recently a friend mentioned she wanted to load all of the files using the COPY command, where all the data files were located in many, many sub-directories. You can load all of the files in a single command by looping through each of the sub-directories. I have the following files in sub-directories under the parent...