Re: Efficient Views..
Date: Mon, 6 Jun 1994 16:12:26 GMT
Message-ID: <CqzH0s.JDw_at_brunel.ac.uk>
In article <jdennisCqupqn.2K0_at_netcom.com> jdennis_at_netcom.com (John Dennis) writes:
>
>Hello,
>
>I'm creating a view between two tables A and B. Is there overhead to
>defining this view with *all* the columns in A and B compared to *just*
>the columns the people accessing it will need. The join is straight
>forward (i.e. A.x = B.x).
>
>The reason for the question is that, currently, I don't really (nor they
>me thinks) know what columns from A and B they need -- only that the join
>is necessary because some columns will be used from both tables.
>
If the A.x = B.x JOIN is the main/only one that links these two tables, and performance is a consideration, have you considered CLUSTERing them. This glues the two tables together, and they share ONE copy of the x column. Supposedly perfomance benefits. I've never done proper tests on it, can any one else verify all this ?
One other word of warning, creating a VIEW using a SELECT * FROM ... has all sorts of possible problems if the underlying table changes, since the effective value of '*' changes.
[Query optimisation is done when ?]
>
>Thanks for any input ...
>
I just hope it generates soem ouptu.
-- David McCann Computer Science Yr3 Faculty Rep: All Comp.Sci Undergrads Students Union Court Member (elect) Board of Studies Rep: Comp.Sci 3 Tel: 0956 237670 (any time) Student Council Rep: Comp.SciReceived on Mon Jun 06 1994 - 18:12:26 CEST