Options

CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP in the table definition

Hi, I am trying to migrate from mysql to vertica.
   
In mysql, the db provides the functionality to update the table timestamps automatically by using 'ON UPDATE' construct 
For eg: In Mysql
create <table.name>(
<column_name> timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);

Does a similar functionality exists in Vertica?

Else do I need to include(Insert/Update) CURRENT_TIMESTAMP in each of the update statement

Thanks in advance 

Comments

  • Options
    Vertica does not support trigger-like features like this one.  In general, calling current_timestamp() carries enough overhead that it will be noticeable for large inserts.  I would suggest statement_timestamp() which is constant over a single statement and considerably faster.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file