Using Views - Do they imfluence performance
Posted in 1999
Topics: Performance & Tuning, SQL Development & Query Writing, Server Administration, Platform-Specific Issues
I'm Using v 7.3 on Aix 4.3. I've been asked to provice views that represent some rather complex queries; 8 tables with
outer joins. Will I see any performance imprevement in the use of a View vs. straight execution of the query? I've
tried to run both through dbaccess with EXPLAIN set on, and they return identical estimated cost values. Other than
making life easier for the programmers (and more diffficult for me) are there any (positive or negative) benefits?
FProse wrote:
>
> I'm Using v 7.3 on Aix 4.3. I've been asked to provice views that represent some rather complex queries; 8 tables with
> outer joins. Will I see any performance imprevement in the use of a View vs. straight execution of the query? I've
> tried to run both through dbaccess with EXPLAIN set on, and they return identical estimated cost values. Other than
> making life easier for the programmers (and more diffficult for me) are there any (positive or negative) benefits?
Views do not have a major impact on query performance one way or the
other normally. The exception is when you select a subset of the view
columns and/or join the view to another table. There are situations
where the optimizer cannot filter out the unneeded columns until the
query is completed and this can slow things down versus writing the
equivalent query against the underling tables.
Art S. Kagel