Re: [R] odbcQuery , memory.size

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue, 18 Mar 2008 09:08:23 +0000 (GMT)

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

______________________________________________
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 Tue 18 Mar 2008 - 09:16:12 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 Tue 18 Mar 2008 - 09:30:23 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.

list of date sections of archive