[R] my RMySQL connections are so SLOW

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 5 12:08:16 CEST 2003

On Mon, 5 May 2003, Laurent Faisnel wrote:

> Thank you for your fast answer. I work on a 450MHz Pentium II with 192 
> MBytes RAM.

And Linux.  That's a rather old spec --  4-5 years?

> dbListTables() takes about 3 seconds. For direct use it's OK, but when 
> requests become included in programs, it makes very slow programs !
>  I had to calculate an average score for each value of a column (i=1:12) 
> to fill an array, and so the operation (pretty simple) took more than 30 
> seconds (almost 3 seconds per "select avg(score)..." request).
> I don't think my dataset is huge enough to make it worth using ODBC, 
> which would cause other problems. I do not start R for each query. I 
> have the same slowness when sending the requests to R directly (without 
> using source code).
> What makes me hope for a solution is when you say "For me running a 
> query is instant". What could be the difference between our systems ? 
> The CPU speed does not explain all, in my opinion.

Well, I am using a dual Athlon 2600, 1Gb RAM and a fast local disc system,
so that is a considerable difference.  Maybe you need more RAM.

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