Statalist The Stata Listserver

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

Re: st: Memory during a merge

From   [email protected] (William Gould, Stata)
To   [email protected]
Subject   Re: st: Memory during a merge
Date   Fri, 03 Nov 2006 08:48:29 -0600

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

-- Bill
[email protected]
*   For searches and help try:

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