Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Time to read in data with use/using


From   David Kantor <kantor.d@att.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Time to read in data with use/using
Date   Tue, 02 Dec 2008 09:51:39 -0500

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/



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