Random SELECT on subset

2006-08-13 Thread Mark
Dear MySQL-ers, Using MySQL 4.1.20, I'm trying to do a complex query on a subset; well, complex to me, that is. :) In Perl, I'm trying to get 4 random entries from a subset WHERE processed = '1' and columnId is unique. Like so: $sth = $dbh-prepare (SELECT columnId FROM queue WHERE columnId =

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: Dear MySQL-ers, Using MySQL 4.1.20, I'm trying to do a complex query on a subset; well, complex to me, that is. :) In Perl, I'm trying to get 4 random entries from a subset WHERE processed = '1' and columnId is unique. Like so: $sth = $dbh-prepare (SELECT columnId FROM queue WHERE

RE: Random SELECT on subset

2006-08-13 Thread Mark
-Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 3:55 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset In Perl, I'm trying to get 4 random entries from a subset WHERE processed = '1' and columnId is unique

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 3:55 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset In Perl, I'm trying to get 4 random entries from a subset WHERE processed = '1' and columnId is unique

RE: Random SELECT on subset

2006-08-13 Thread Mark
-Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:18 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Then I want to select 4 random columnIDs, but only from the subset WHERE processed = '1' (so, from the group

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:18 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Then I want to select 4 random columnIDs, but only from the subset WHERE processed = '1' (so, from

RE: Random SELECT on subset

2006-08-13 Thread Mark
-Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:54 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Hmm, this still does not do what I want: SELECT columnId FROM queue WHERE processed = '1' ORDER BY RAND() LIMIT 4

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:54 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Hmm, this still does not do what I want: SELECT columnId FROM queue WHERE processed = '1' ORDER BY RAND

RE: Random SELECT on subset

2006-08-13 Thread Mark
-Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 6:32 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Thanks to you, the query has been greatly simplified, but the result is still the same: every once in a while

Re: Random SELECT on subset

2006-08-13 Thread Chris
Mark wrote: -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 6:32 To: Mark Cc: mysql@lists.mysql.com Subject: Re: Random SELECT on subset Thanks to you, the query has been greatly simplified, but the result is still the same: every once

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-04-03 Thread Jorrit Kronjee
On 3/29/2006 2:10 PM, Jorrit Kronjee wrote: It seems you are running in to Bug #7209: http://bugs.mysql.com/bug.php?id=7209 This is fixed in 5.0.19 now. Best regards Mark Mark, Apparently so, thanks for the hint! We'll try to upgrade as soon as possible. I'll supply the mailing

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-04-03 Thread Mark Leith
Jorrit Kronjee wrote: On 3/29/2006 2:10 PM, Jorrit Kronjee wrote Mark, Apparently so, thanks for the hint! We'll try to upgrade as soon as possible. I'll supply the mailing list with the results of the upgrade. Mark, We've been testing it over the weekend and it seems that the bugs

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Jorrit Kronjee
[EMAIL PROTECTED] wrote: is this relevant ? We've been looking at connection graphs, but MySQL doesn't seem to reach that limit. However, these are timely based measurements, so it could've peaked in between, although highly unlikely. I'm not very comfortable tweaking these values in a

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Mark Leith
Hi Jorrit, Jorrit Kronjee wrote: [EMAIL PROTECTED] wrote: is this relevant ? We've been looking at connection graphs, but MySQL doesn't seem to reach that limit. However, these are timely based measurements, so it could've peaked in between, although highly unlikely. I'm not very

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-29 Thread Jorrit Kronjee
Mark Leith wrote: Hi Jorrit, Jorrit Kronjee wrote: [EMAIL PROTECTED] wrote: is this relevant ? We've been looking at connection graphs, but MySQL doesn't seem to reach that limit. However, these are timely based measurements, so it could've peaked in between, although highly unlikely.

Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
Hello list, Recently we upgraded from 3.23.3 to 5.0.18 and started noticing some weird behaviour. We have update scripts running on a regular interval and some of these scripts randomily exited with MySQL error: SELECT command denied to user 'user'@'host' for table 'example' However, this error

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
[EMAIL PROTECTED] Subject: Random 'select permission denied' since upgrade to 5.0.18 Hello list, Recently we upgraded from 3.23.3 to 5.0.18 and started noticing some weird behaviour. We have update scripts running on a regular interval and some of these scripts randomily exited with MySQL error

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread mysql
On Tue, 28 Mar 2006, Jorrit Kronjee wrote: To: mysql@lists.mysql.com From: Jorrit Kronjee [EMAIL PROTECTED] Subject: Re: Random 'select permission denied' since upgrade to 5.0.18 snip Could this message appear when, for instance, a maximum amount of threads has been spawned or MySQL has

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
[EMAIL PROTECTED] wrote: On Tue, 28 Mar 2006, Jorrit Kronjee wrote: To: mysql@lists.mysql.com From: Jorrit Kronjee [EMAIL PROTECTED] Subject: Re: Random 'select permission denied' since upgrade to 5.0.18 snip Could this message appear when, for instance, a maximum amount of threads has been

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread Jorrit Kronjee
is your access control by hostname or IPnumber? if hostname you could be having transient DNS issues - where the IPnumber on the client connect can't be resolved into the permitted hostname (fast enough). try using IPnumber in the access control and see if the problem goes away - if it does

Re: Random 'select permission denied' since upgrade to 5.0.18

2006-03-28 Thread mysql
On Tue, 28 Mar 2006, Jorrit Kronjee wrote: To: mysql@lists.mysql.com From: Jorrit Kronjee [EMAIL PROTECTED] Subject: Re: Random 'select permission denied' since upgrade to 5.0.18 [EMAIL PROTECTED] wrote: On Tue, 28 Mar 2006, Jorrit Kronjee wrote: To: mysql@lists.mysql.com From

Re: random select 1 record

2002-09-26 Thread mos
At 02:08 AM 9/20/2002, you wrote: Hi all, anyone knows a good method to retrieve 1 random selevted record out of thouseands? right now I'm using select ID from table ORDER BY rand() LIMIT 1 however, this seems like a very slow method, like mysql first organizes a few thousand records in a

random select 1 record

2002-09-20 Thread W. Enserink
Hi all, anyone knows a good method to retrieve 1 random selevted record out of thouseands? right now I'm using select ID from table ORDER BY rand() LIMIT 1 however, this seems like a very slow method, like mysql first organizes a few thousand records in a random 1 and only returns 1 Any

Re: random select 1 record

2002-09-20 Thread MySQL
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org) From: W. Enserink [EMAIL PROTECTED] Date: Fri, 20 Sep 2002 09:08:53 +0200 anyone knows a good method to retrieve 1 random selevted record out of thouseands? right now I'm using select ID from

Random Select Statement - help please

2002-01-09 Thread David V. Edelstein
in subsequent queries? If so when does this variable expire? When you close the connection? -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 2:40 AM To: David V. Edelstein Subject: RE: Random Select Statement?? Sorry Roger, It's

RE: Random Select Statement - help please

2002-01-09 Thread Roger Baklund
* David V. Edelstein I would like to create a mySQL query that will find the max user_id, use this value to calculate a random value of the user_id from [1 thru max], then return the entire row for that person(user_id) filled in with that persons(row) four entities, which I can use to

RE: Random Select Statement - help please

2002-01-09 Thread Rick Emery
Easier method: SELECT * FROM people ORDER BY RAND() LIMIT 1; -Original Message- From: David V. Edelstein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 1:08 PM To: 'Roger Baklund' Cc: '[EMAIL PROTECTED]' Subject: Random Select Statement - help please Hi Roger, Thanks

Random Select Statement??

2002-01-07 Thread David V. Edelstein
I'm trying to create a select statement that will go into a table find the number of rows in the table then select a single random row and return it. I am using Java/mySQL with the mm.mysql JDBC drivers. I've been playing around with the following statement but it doesn't seem to like the

RE: Random Select Statement??

2002-01-07 Thread Roger Baklund
* David V. Edelstein I'm trying to create a select statement that will go into a table find the number of rows in the table then select a single random row and return it. I am using Java/mySQL with the mm.mysql JDBC drivers. I've been playing around with the following statement but it

random select

2001-04-03 Thread Marcos
hi, i would like to show 5 random field from a total of 100. id is my primary key id name -- abmarcos akjohn how can i show 5 of them randomly? thanks in advance, marcos [EMAIL PROTECTED]

Re: random select

2001-04-03 Thread Thalis A. Kalfigopoulos
On Tue, 3 Apr 2001, Marcos wrote: hi, i would like to show 5 random field from a total of 100. id is my primary key id name -- abmarcos akjohn how can i show 5 of them randomly? thanks in advance, marcos When you say "5