Re: [R] Reading huge chunks of data from MySQL into Windows R

From: hadley wickham <h.wickham_at_gmail.com>
Date: Tue 07 Jun 2005 - 01:34:33 EST

> In my (limited) experience R is more powerful concerning data manipulation. An example: I have a vector holding a user id. Some user ids can appear more than once. Doing SELECT COUNT(DISTINCT userid) on MySQL will take approx. 15 min. Doing length(unique(userid)) will take (almost) no time...

I think you have it around the wrong way - or you don't have indexes set up in mysql. If you're dealing with large quanities of data I'd strongly recommend learning about sql indexes as it will save you a LOT of time.

Hadley



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 Received on Tue Jun 07 02:03:42 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:23 EST