Skip to content
Prev 1418 / 1559 Next

SQL vs R

So,

some feedback.

Have installed MariaDB 10.0.10 on the Linux box. That speeded things up.
Changed from InnoDB/XtraDb to Aria. That speeded loading of the data up.
Have installed MariaDB on the iMac. That speeded things up more.
Tried to tune MariadDB's config. Didn't speed things up much, but for
the query buffer.
Figured out Replication (from the linux box to the iMac). This slowed
loading down somewhat.
Played with the SQL. Speeded things up significantly.
Played with the inxdexes. Did not speed things up much.
Found what I could do in data.table that was faster than SQL and did
that. Obvious increase in speed.

My R processing time came down from 35 to 6 1/2 minutes.


Removed all large tables before saving (and once the raw data was no
longer required). That reduced RData from 150MB to 7KB.

Pushed the table and image generation into a second R file. This takes 4
seconds. The corresponding LyX/LaTeX/Beamer/KnitR runs in 12 seconds.

Installed RStudio. Nice.

Adding new SQL queries adds between 30 and 90 seconds in the input R
file, next to nothing to the presentation generation.

I could not care lass how long the input takes, even hours, as long as I
can save the analysis results and not the data into the RData.

el

PS: Ordered a MacPro :-)-O. Will report back.

on 2014-05-06, 15:40 Peter Crowther said the following: