-
Notifications
You must be signed in to change notification settings - Fork 555
Open
Description
Check out this code: https://github.com/oldmoe/mysqlplus/blob/master/ext/mysql.c#L1363
This is really useful for picking out random results on -huge- queries, and helps to get around the RAND() slowdown problems. You could implement a result[rand(result.count)] and not have to pull down an entire pile of records into ruby.
I'm working on a piece of code to allow people to utilize this easily using mysqlplus.. but I'd love to be able to do it in mysql2 instead :-)