Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Why is in memory size different?
From
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Why is in memory size different?
Date
Thu, 16 Jan 2014 11:24:15 -0500
Nicola, the difference seems to be 4 bytes per observation regardless
of the dataset, this is true for your case, and e.g. for the auto.dta.
It happens only in the MP versions as far as I can tell. (does not
happen in 9.2SE, and 10.0SE, happens in 11MP, 12MP, 13MP), but there
are more dimensions to the problem (32/64 bit, and version ordering).
All checks in Windows versions only.
It might be related to this:
http://www.stata.com/support/faqs/data-management/approximating-dataset-size/
and this
http://www.stata.com/statalist/archive/2006-12/msg00195.html
If anything I would expect the 4 bytes to be added for the reported
size of dataset in memory, not for the dataset on the disk (since the
additional pointers created by Stata are not saved to disk, they only
exist in memory).
Note however, that the dataset width is returned correctly regardless
whether the dataset is in memory or on the disk, e.g. it is 43 for the
auto dataset.
Why do you need this size?
Data width is always reported correctly (for data in memory and on
disk) and it is saved to r() results. Use this if possible.
Best, Sergiy
On Wed, Jan 15, 2014 at 6:52 PM, Nic Man <[email protected]> wrote:
> Hi everyone,
> I am trying to figure out why the reported size is different for my Stata data files (same for a few other files that I tested, big and small). I am using Stata MP 12.1 on Windows.
>
> . use T:\Stata\PIFH.dta
>
> . desc, short
>
> Contains data from T:\Stata\PIFH.dta
> obs: 42,664
> vars: 903 30 Aug 2013 09:12
> size: 39,848,176
> Sorted by:
>
> . desc using T:\Stata\PIFH.dta , short
>
> Contains data
> obs: 42,664 30 Aug 2013 09:12
> vars: 903
> size: 40,018,832
> Sorted by:
>
> Regards,
> Nicola
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/