[R] SQL vs R

Gabor Grothendieck ggrothendieck at gmail.com
Tue May 6 13:00:02 CEST 2014


On Tue, May 6, 2014 at 5:12 AM, Dr Eberhard Lisse <el at lisse.na> wrote:
> Jeff
>
> It's in MySQL, at the moment roughly 1.8 GB, if I pull it into a
> dataframe it saves to 180MB. I work from the dataframe.
>
> But, it's not only a size issue it's also a speed issue and hence I
> don't care what I am going to use, as long as it is fast.
>
> sqldf is easy to understand for me but it takes ages.  If
> alternatives were roughly similar in speed I would remain with
> sqldf.
>
> dplyr sounds faster, and promising, but the intrinsic stuff is
> way beyond me (elderly Gynaecologist) on the learning curve...

You can create indices in sqldf and that can speed up processing
substantially for certain operations.   See examples 4h and 4i on the
sqldf home page: http://sqldf.googlecode.com. Also note that sqldf
supports not only the default SQLite backend but also MySQL, h2 and
postgresql.  See ?sqldf for info on using sqldf with MySQL and the
others.



More information about the R-help mailing list