Re: improving random record selection

2008-05-17 Thread Rob Wultsch
On Sat, May 17, 2008 at 2:32 PM, Scott Haneda <[EMAIL PROTECTED]> wrote: >$sql = " >SELECT storage_path, image_md5, t.id >FROM images AS t >JOIN >(SELECT CEIL(MAX(id)*RAND()) AS id FROM images) AS x > ON (t.id >

improving random record selection

2008-05-17 Thread Scott Haneda
I posted this a month or so ago, and was helped a little, but I am now back. Currently I use select x, y, z from images where (condition) order by rand() limit 1; As most know, it is slow, depending on the record set, and what I compare it to, it can be from one order of magnitude slower,

Re: changing 'max_allowed_packet'

2008-05-17 Thread Norbert Tretkowski
Am Freitag, den 16.05.2008, 14:55 -0700 schrieb Sigfrid: > Hello, I have a simple question: how can I change the value of > max_allowed_packet? http://dev.mysql.com/doc/refman/5.1/en/program-variables.html Norbert -- MySQL General Mailing List For list archives: http://lists.mysql.com/

Re: purge binary logs on master

2008-05-17 Thread Juan Eduardo Moreno
Ananda, Use, PURGE MASTER LOGS TO 'name of the last binary that you want leave in your disk'; Regards On Sat, May 17, 2008 at 8:56 AM, Ananda Kumar <[EMAIL PROTECTED]> wrote: > Hi All, > I using this command to purge binary logs on master, but i dont see the > binary logs getting deleted. These

purge binary logs on master

2008-05-17 Thread Ananda Kumar
Hi All, I using this command to purge binary logs on master, but i dont see the binary logs getting deleted. These binary logs are listed in index file. I am using mysql version 5.0.41 community version. Can you please let me know if any thing else need to be done for this to work. log-bin is enab