Date: Wed, 24 Jul 2002 08:18:58 -0500
Reply-To: goldbergj@MSNOTES.WUSTL.EDU
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: goldbergj@MSNOTES.WUSTL.EDU
Subject: Re: Settle an argument about a view
Content-type: text/plain; charset=us-ascii
I haven't seen this completely documented. Conceptually, a view is a
pointer to data. What actually happens depends.
On what?
Remember that a view need not refer to a SAS data file. In fact, views
come from the SQL world, and SAS views can point to data in a table managed
by an RDMBS. I recall reading, I *think* in a note on V9 enhancements,
that one improvement was in the handling of spill files created when views
needed to have scrollback capabilities. This might also apply to a SAS
data step which used direct access; the word is "might." The point is
that cases exist where a physical copy of some or all of the data is
needed.
Take-home message: this subject has twists and turns. However, I expect
that on the whole views tend to save space. In particular, if the idea is
to do an intermediate computation on the way to a proc, as:
data new/view = new;
newkey = var1 || var2;
run;
proc sort data = new out = final; by newkey;
then there would be a space (and time, and i/o) savings through not having
to create a physical data set "new". Everything should be done in memory
on the way in to the sort.
Jonathan Goldberg
Missouri Alcoholism Research Center
Washington University School of Medicine
40 N. Kingshighway, Suite One
St. Louis, MO 63108
314-286-2212
|