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

From: Thomas Pujol <thomas.pujol_at_yahoo.com>
Date: Thu, 13 Dec 2007 16:58:59 -0800 (PST)

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. Received on Fri 14 Dec 2007 - 01:05:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Dec 2007 - 08:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.