Thursday, March 09, 2006

Re: st: Re: memory required for -merge-

Turning the place_name variable from string to numeric with labels would save a lot of bytes and (hopefully) make the merge possible.

rename place_name place_name1 encode place_name1, gen(place_name) label(place_name) drop place_name1

On 3/9/06, Michael Blasnik <michael.blasnik@verizon.net> wrote: > You've gotten several replies that dance around the simple answer -- you are > trying to add a str39 variable to a dataset with more than 20 million > observations. That will require about 39*20m= 780MB of additional memory > and you've only got about 666MB free. > > Michael Blasnik > michael.blasnik@verizon.net > > ----- Original Message ----- > From: "Danielle H Ferry" <dferry@nber.org> > To: "StataList" <statalist@hsphsun2.harvard.edu> > Sent: Wednesday, March 08, 2006 10:39 PM > Subject: st: memory required for -merge- > > > > Hi all, > > > > Is there a rule for the amount of memory required for -merge-? I keep > > getting a "no room to add more variables due to width" error on the same > > merge. I am attempting to -merge- on only one variable (placefip), and > > 67% of memory is free before I attempt the -merge- (i.e., while the > > "master" dataset is loaded). The "using dataset is small, and I've got > > the memory set quite high (900m). So, I can't understand why I am running > > into memory problems. > > > > This is the info on the "master" dataset: > > > > . des > > > > Contains data from ../data/geog/geog_pooled.dta > > obs: 20,873,141 > > vars: 4 8 Mar 2006 21:32 > > size: 333,970,256 (66.5% of memory free) (_dta has notes) > <snip> > > And this is the info on the "using" dataset: > > > > . des using ../data/geog/geog_cc > > > > Contains data > > obs: 25,150 8 Mar 2006 22:21 > > vars: 3 > > size: 1,207,200 > > ------------------------------------------------------------------------ > > ------- > > storage display value > > variable name type format label variable label > > ------------------------------------------------------------------------ > > ------- > > macci byte %1.0g Center city > > placefip long %07.0f > > place_name str39 %39s > > ------------------------------------------------------------------------ > > ------- > > Sorted by: placefip > > * > * 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/ >

-- Ada Ma Research Fellow Health Economics Research Unit University of Aberdeen, UK. http://www.abdn.ac.uk/heru/ Tel: +44 (0) 1224 553863 Fax: +44 (0) 1224 550926

* * 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/


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?