[R] Another big data size problem

Ernesto Jardim ernesto at ipimar.pt
Wed Jul 28 16:16:43 CEST 2004


On Wed, 2004-07-28 at 16:26, Federico Gherardini wrote:
> On Wed, 28 Jul 2004 13:28:20 +0100
> Ernesto Jardim <ernesto at ipimar.pt> wrote:
> 
> 
> > Hi,
> > 
> > When you're writing a table to MySQL you have to be carefull if the
> > table is created by RMySQL. The fields definition may not be the most
> > adequate and there will be no indexes in your table, which makes the
> > queries _very_ slow.
> > 
> So, if I understood correctly, if you want to use SQL you'll have to upload the table in SQL, directly from MySQL without using R at all, and then use RMySQL to read the elements in R?
> 

If you can't get R to read the table then you can't use R/RMySQL ;)

When creating tables in MySQL you may improve a lot the speed of scaning
the table with the proper fields definition and indexing. See the MySQL
manual, it is a very good reference and quite easy to read (at least the
sections related with table design).

The basis is to create indexes for the fields you're supose to restrict
(fields to be used with the "WHERE" clause in SQL statements)
considering the order of those fields.

Regards

EJ




More information about the R-help mailing list