Using Query Labels


In an earlier post, I wrote about the importance of using stream names for COPY loads in Vertica. This post continues on that topic with using query labels on DML statements such as SELECT, INSERT, UPDATE and DELETE.

Query labels must have the following characteristics:

  • All characters must be alphanumeric with any number of underscores (_) and dollar signs ($)
  • The maximum label length is 128 octets
  • The label cannot contain space characters

Label syntax

Labels take the following form:

You can use optional spaces before and after the plus sign in label hints (between the /* and the +). For example, HP Vertica accepts each of the following directives:


Here’s an example of some simple label hints and their associated queries:


About the author / 

Norbert Krupa

Norbert is the founder of and a Solutions Engineer at Talend. He is an HP Accredited Solutions Expert for Vertica Big Data Solutions. He has written the Vertica Diagnostic Queries which aim to cover monitoring, diagnostics and performance tuning. The views, opinions, and thoughts expressed here do not represent those of the user's employer.


  1. sra1 February 1, 2016 at 12:09 AM -  Reply

    Hi label is not working for me, is there any dba setting needs to be activated prior using the label concept?

    • Norbert Krupa February 1, 2016 at 9:56 AM -  Reply

      Can you please explain what “not working” means? Give specific examples.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Upcoming Events

  • No upcoming events
AEC v1.0.4

Subscribe to Blog via Email

Enter your email address to subscribe and receive notifications of new posts by email.

Read more use cases here.


This site is not affiliated, endorsed or associated with HPE Vertica. This site makes no claims on ownership of trademark rights. The author contributions on this site are licensed under CC BY-SA 3.0 with attribution required.
%d bloggers like this: