At 09:08 AM 12/2/2008, sdm1 wrote:
[...]
If I select one variable from a large dataset ('use vara using filename') it
takes Stata 37 minutes to read in the data (vara).
If I save this one variable to a file and then read in this file (vara.dta)
it takes less than 15 seconds to be read in.
I thought that 'use vara using filename' meant that only vara would be read
in. But if so, why does it take so much longer to read in the same data
when it is extracted from a larger file than when it is in a file on its
own?
When it is extracted from a larger file, it still has to read the
entire larger file to get the targetted variable(s). That's a simple
fact about how file storage works.
HTH,
--David
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/