The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Need help for optimization
Hi there.
I have a question regarding join optimization :
I have 2 data sets, DS1 and DS2, with lot of columns and I only need four of them from DS2.
Is it better to do :
Select DS1.*, DS2.Var1, DS2.Var2, DS2.Var3, DS2.Var4
from DS1 as DS1
left join DS2 as DS2
on DS1.Var1 = DS2.Var1 and DS1.Var2 = DS2.Var2 and DS1.Var3 = DS2.Var3
OR
Select DS1.*, DS2.Var1, DS2.Var2, DS2.Var3, DS2.Var4
from DS1 as DS1
left join (select Var1, Var2, Var3, Var4 from DS2) as DS2
on DS1.Var1 = DS2.Var1 and DS1.Var2 = DS2.Var2 and DS1.Var3 = DS2.Var3
?
Many thanks in advance
0