RE: Rand slowness.

2002-06-27 Thread Jon Frisby
L List [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 27, 2002 2:44 PM > To: Jon Frisby > Cc: mysql > Subject: Re: Rand slowness. > > > I tried this, but it seems to be ignoring the LIMIT 3, since it > is returning > all the rows. > > > > Try: > >

RAND slowness?

2002-06-27 Thread MySQL List
Hi, Can someone tell me which query would be faster with say 1000 rows: SELECT * FROM table ORDER BY RAND() LIMIT 3; or SELECT * FROM table; then use php to get 3 random rows from the returned data? - Before posting, please

Re: Rand slowness.

2002-06-27 Thread MySQL List
F > > > -Original Message- > > From: MySQL List [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, June 27, 2002 12:05 PM > > To: mysql > > Subject: Rand slowness. > > > > > > Hi, > > Is there a quicker way to get a selection of random rows th

Rand slowness.

2002-06-27 Thread MySQL List
Hi, Is there a quicker way to get a selection of random rows than RAND()? I basically use: SELECT * FROM table ORDER BY RAND() LIMIT 3; But I find that as the # of rows increases in table, it keeps taking longer and longer to get a result back. And I am talking a large increase, basically 50 row