[R] odbcQuery , memory.size

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Mar 18 10:08:23 CET 2008


On Tue, 18 Mar 2008, Lukas Rohrer wrote:

> Dear R cracks
>
> I am trying to fetch 38 Tables from 38 ESRI Geodatabases through an ODBC
> connection.

On Windows, using RODBC?

> I stored the 38 channels in a list and the 38 tablenames in an other list.

Why?  It looks like you only need the channel once.

> With a
>
> for(i in 1:38) .... sqlFetch(....) I try to read the tables into a third
> list. But always after a certain amount of rounds (mostly 16) i get
>
> Fehler in odbcQuery(channel, query, rows_at_time) :
>        Calloc konnte nicht (67108864 von 1) Speicher zuteilen
> Zus??zlich: Warning message:
> Reached total allocation of 1021Mb: see help(memory.size)
>
> When I keep on trying the rounds will stop at 1.
>
> Any sugestions?

Buy more meomry.  1Gb is very low these days for working with databases.

But take a look at what happened when you tried 16, by using object.size() 
on the objects you created.  I suspect they are too large to store in 
memory in your small computer.  If so, you need to store them on disc: 
there are several ways to do that such as package SQLiteDF or RODBC to 
a single database.

If not, you may succeed by retrieving say 13,13,12 in 3 sessions and 
saving the workspaces, then loading all three workspaces into one session.


> Sincerely Lukas
>
> --
> --
> Arbeit:
> Tel: +41 44 632 55 98
>
> ETH Z??ich
> Institut f?? terrestrische ??osysteme
> Professur Wald??ologie
> Universit??strasse 22
> CH-8092 Z??ich
>
> 	[[alternative HTML version deleted]]
>
>

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