"shorti" wrote in message
> We are using db2 v8.2 on AIX
>
> Would using a VIEW for the sole purpose of only needing to look at one
> table to get data make sense?
>
> If you have three tables T1, T2, T3 that contain 2 columns each that
> you need to constantly query is it better to use a VIEW or to just use
> a regular SELECT for performance purposes?
>
> i.e : SELECT T1.col1, T1.col2, T2.col1, T2.col2, T3.col1, T3.col2
> from T1, T2, T3 WHERE T1.col1 IN (SELECT col2 FROM T2 WHERE col3 = 5
> AND col4 = 'N' AND col5 = col6 AND col5 = T3.col1 and T3.col4 = 'N')
> AND .....
>
>
> Versus setting up a VIEW for the 6 columns in the 3 tables then using
> a similar
>
>
> Or..maybe there is another suggestion.
If you use a view it could take slightly longer (but barely measurable) to
compile the SQL, but if your dynamic statements are cached (or they use
static SQL in a package) then there is no performance difference at all.
>> Stay informed about: VIEW performance advantage/disadvantage?