[R] RODBC, optimizing memory, "Error: cannot allocate vector of size 522 Kb".

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Dec 14 08:04:36 CET 2007


This question is nothing to do with RODBC.

You need to study the rw-FAQ Q2.9: I believe you should be able to get up 
to (almost) 3GB on that system.  (BTW, you seem confused about units: I 
hope you have 3GB of RAM, where G means 1024^3.)


On Thu, 13 Dec 2007, Thomas Pujol wrote:

> I am using RODBC and "odbcConnect".  I have successfully used 
> odbcConnect to extract "modest" amounts of data from SQL.  For 
> convenience, (and maybe speed?) I wish, if possible, to extract larger 
> amounts of data in a single query.
>
>  (I am running R2.6.0 under a machine running Windows Small Business 
> Server with 3mb of RAM.  I run gc() prior to attempting the query.  I 
> have attempted to maximize the memory R uses by running the command 
> "memory.size(4095)")
>
>  After attempting my "odbcConnect" query, I receive the following error message:
>   "Error: cannot allocate vector of size 522 Kb".
>
>  After I received the message, I obtained the following statistics re my memory use:
>   memory.limit(size = NA)/1000 #reports memory size
> [1] 4.095
>> memory.size(max = F)/1000 #reports amount of memory currently in use
> [1] 1.930705
>> memory.size(max = T)/1000 #reports maximum amount of memory obtained from the OS
> [1] 1.93925
>
>  Before I give up and go back to running many queries to extract my data, I wanted to ask if there were any suggestions. (I really do wish to extract all this data for local storage as R-files on my hard-drive, it is just a question of the easiest and fastest process.)  Thanks.
>
>
>
>
> ---------------------------------
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list