Using NOT EXISTS performance

Moderator: NorbertKrupa

Post Reply
beth
Intermediate
Intermediate
Posts: 58
Joined: Tue Oct 01, 2013 12:42 pm

Using NOT EXISTS performance

Post by beth » Wed Jan 07, 2015 11:49 am

Hi all,

Anyone have any experience in using a NOT EXISTS clause to check if data to be inserted already exists in a table? I've done this in my Oracle DB and was curious if there'd be a big impact on performance in Vertica given that it already stinks with INSERTs.

Something like this:

INSERT INTO tab1 SELECT new_a_value, new_b,_value, new_c_value WHERE NOT EXISTS (SELECT 1 FROM tab1 x WHERE x.a = new_a_value);

Post Reply

Return to “Vertica Database Administration”