Brian Dunning wrote:
I am using a routine to find 50 random records in a large MySQL
how random does it need to be? if *psuedo* (nobody start on the
computer random is not really random argument - go watch What the bleep
do we know? instead) random is okay maybe you could define a list
of
Try using a temporary table. It should be pretty fast. You'd do
something like
1. Select from table1 according to search criteria
2. Insert data from #1 into temp_table1
3. Random selection from temp_table1
kgt
Brian Dunning wrote:
I am using a routine to find 50 random records in a
Brian Dunning wrote:
I am using a routine to find 50 random records in a large MySQL
database (about a million records) where I generate a list of 50 random
unique ID's,
why can't you use the where condition in the above query?
and then use MySQL's in command to find them. I can't
use
On Jun 3, 2005, at 6:48 AM, Marek Kilimajer wrote:
Brian Dunning wrote:
I am using a routine to find 50 random records in a large MySQL
database (about a million records) where I generate a list of 50
random unique ID's,
why can't you use the where condition in the above query?
Brian Dunning wrote:
On Jun 3, 2005, at 6:48 AM, Marek Kilimajer wrote:
Brian Dunning wrote:
I am using a routine to find 50 random records in a large MySQL
database (about a million records) where I generate a list of 50
random unique ID's,
why can't you use the where condition in
On Thu, June 2, 2005 4:31 pm, Brian Dunning said:
I am using a routine to find 50 random records in a large MySQL
database (about a million records) where I generate a list of 50
random unique ID's, and then use MySQL's in command to find them. I
can't use order by rand() due to its
Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
How do you generate a list of 50 random unique IDs in the first place?
By using the SQL function to create those randoms
How to you guarantee that all those IDs are in the database?
No need for that. When you do
I am using a routine to find 50 random records in a large MySQL
database (about a million records) where I generate a list of 50
random unique ID's, and then use MySQL's in command to find them. I
can't use order by rand() due to its performance hit.
But I have to take it one more step: I
8 matches
Mail list logo