Vertica Blog

Vertica Blog

Quick Tips

Vertica Quick Tip: Date Arithmetic

This blog post was authored by Jim Knicely. Date arithmetic in Vertica is extremely easy! What is today’s, yesterday’s and tomorrow’s date? But you’re not limited to whole days! You can also easily add and subtract partial days (i.e. hours, minutes and seconds)! Have Fun!

Vertica Quick Tip: Avoid Using Functions on Very Large Data Sets

This blog post was authored by Jim Knicely. You can store billions and billions and billions (i.e. a lot) of records in your Vertica tables. When querying these large data sets, try to avoid using database functions like TO_DATE, TO_CHAR, NVL, etc. when unnecessary. A table named BIG_DATE_TABLE has 1 billion rows and a column...

Vertica Quick Tip: Generating a Random Date

This blog post was authored by Jim Knicely. I can easily generate a random integer value using the Vertica built-in RANDOMINT function. For example: But what if I need a random date? Luckily in Vertica I can create my own SQL function for that! Example

Vertica Quick Tip: The LIMIT Analytic Function

This blog post was authored by Jim Knicely. Vertica contains an abundance of built-in SQL analytic functions. One of the lesser known but also one of the coolest is the LIMIT analytic function. Example Say I have the following table data: But I only want to see the latest test number for each date. For...

Vertica Quick Tip: How to Query for NaN Values

This blog post was authored by Jim Knicely. We're introducing a new series: Vertica Quick Tips! These tips are intended to give you concise information to help you get the most out of using Vertica. NaN (Not a Number) does not equal anything, not even another NaN. You can query for them using the predicate...