Re: [R] loading data and executing queries with R and Mysql

From: bogdan romocea <br44114_at_gmail.com>
Date: Wed 03 Jan 2007 - 13:30:01 GMT


Nevermind the CPU usage, the likely problem is that your queries are inefficient in one or more ways (i.e., you don't use indexes when you really should - it's impossible to guess without knowing how the data and the queries look like, which somehow you've decided are not important enough to describe in your email). One nice reference is http://highperformancemysql.com/

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Bagatti Davide
> Sent: Wednesday, January 03, 2007 8:05 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] loading data and executing queries with R and Mysql
>
> Hello everyone,
>
> I have a problem when I execute queries using R 2.3.1 and
> MySql server 5.0.
> What I do: I load data in different csv files (every file represents a
> particular temporal step of a simulation) using Mysql query
> "load data" with
> RMySQL command DbSendQuery (but the same problem there is also using
> DbWritetable). Then I use a function where I have a lot of
> queries that
> interact with the database.
> Well, while loading data is very fast, query execution is very slow
> ...looking to Windows task manager I see that my cpu doesn't
> go to 100% of
> usage, but only at 30-45%. Looking at the processes I see Rgui.exe use
> between 0-23% and mysql-nt.exe use between 8-20% and so it is
> very slow. I
> am sure my cpu has no particular problems.
> Could you help me?
>
> Thanks in advance
>
> Davide
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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 Thu Jan 04 01:30:24 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 03 Jan 2007 - 15:30:28 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.