Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Memory during a merge


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   Re: st: Memory during a merge
Date   Fri, 03 Nov 2006 09:08:38 -0600

Bill,

Thanks for the reply. So if I understand you correctly, the observations are brought in and then the non keep variables are deleted? If that is the case the maximum memory use with keep() would be no different than from the memory use without keep. Is this a correct interpretation?

Fred

At 08:48 AM 11/3/2006, William Gould, Stata wrote:

Fred Wolfe <[email protected]> asked about the implementation
of the -keep(<varlist>)- option of -merge-:

> Stata has a keep() option that limits the merging of data in the using data
> set to selected variables. My question is, Does Stata first bring all of the
> using variables into memory or does it somehow drop the non-selected using
> variables before merging.

Stata does *NOT* bring in the entire using dataset and then merge;
it does bring in, one at a time, entire observations from the using
dataset. The basic loop is this

do until all of the using data is read
read *ONE* observation of the using dataset
does it merge?
record the keep() variables in the appropriate
observation in memory
end


-- Bill
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel +1 316 263 2125
[email protected]


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index