: [EMAIL PROTECTED]Cc: Michael Stassen; 'Mysql'; Roger
BaklundSubject: Re: Use of limit with IN on
subquery
What if we used the MySQL-specific
feature "group-wise auto_increment" ? http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html
For MyISAM and BDB tables you can specify AUTO
Hi all-
I'm using MySQL 4.1.7, trying to do a subquery that's apparently unsupported -
I'm hoping someone can provide a quick alternative for me.
I have a simple table Z with 3 columns, k1, k2, and total_amt, where k1 and k2
make up the primary key. I want to create a report that lists the the
Rick Robinson wrote:
Hi all-
I'm using MySQL 4.1.7, trying to do a subquery that's apparently unsupported -
I'm hoping someone can provide a quick alternative for me.
I have a simple table Z with 3 columns, k1, k2, and total_amt, where k1 and k2
make up the primary key. I want to create a
Rick Robinson wrote:
I'm using MySQL 4.1.7, trying to do a subquery that's apparently unsupported -
I'm hoping someone can provide a quick alternative for me.
I have a simple table Z with 3 columns, k1, k2, and total_amt, where k1 and k2
make up the primary key. I want to create a report that
-Original Message-
From: Roger Baklund [mailto:[EMAIL PROTECTED]
Sent: Friday, December 03, 2004 10:32 AM
To: Mysql
Cc: [EMAIL PROTECTED]
Subject: Re: Use of limit with IN on subquery
Rick Robinson wrote:
Hi all-
I'm using MySQL 4.1.7, trying to do a subquery that's apparently
unsupported
have a table with about 500,000 rows (not really too big), so
I'm hopeful.
Thanks again.
Best regards,
Rick
-Original Message-
From: Roger Baklund [mailto:[EMAIL PROTECTED]
Sent: Friday, December 03, 2004 10:49 AM
To: Mysql
Cc: [EMAIL PROTECTED]
Subject: Re: Use of limit
: [EMAIL PROTECTED]
Subject: Re: Use of limit with IN on subquery
Rick Robinson wrote:
I'm using MySQL 4.1.7, trying to do a subquery that's apparently
unsupported - I'm hoping someone can provide a quick alternative for me.
I have a simple table Z with 3 columns, k1, k2, and total_amt, where
k1 and k2
Michael Stassen wrote:
Don't bother. This is a very expensive solution. You get nearly a
Cartesian product on each JOIN. I've got a 40 row test table with 20
values in each of 2 groups. The top 3 version of this examines 2302
rows to produce the 3 values for each of the 2 groups. The top
I think Roger was actually on the right track with his initial suggestion
that this is a groupwise maximum problem as described in the manual page he
referenced. Try this:
CREATE TEMPORARY TABLE topten (k1 CHAR(1), total_amt int);
LOCK TABLES Z AS x READ, Z AS y READ;
INSERT INTO topten
where b.k1=a.k1
and b.total_amt=a.total_amt)
Ed
-Original Message-
From: Rick Robinson [mailto:[EMAIL PROTECTED]
Sent: Friday, December 03, 2004 9:14 AM
To: 'Roger Baklund'; 'Mysql'
Subject: RE: Use of limit with IN on subquery
Hi Roger-
Thanks for responding so quickly
Michael Stassen wrote:
Michael Stassen wrote:
Don't bother. This is a very expensive solution. You get nearly a
Cartesian product on each JOIN. I've got a 40 row test table with 20
values in each of 2 groups. The top 3 version of this examines 2302
rows to produce the 3 values for each of
What if we used the MySQL-specific feature group-wise auto_increment ?
http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html
For MyISAM and BDB tables you can specify AUTO_INCREMENT on a secondary
column in a multiple-column index. In this case, the generated value for
the
[EMAIL PROTECTED] wrote:
What if we used the MySQL-specific feature group-wise auto_increment ?
I was thinking of a similar idea, with user variables, also MySQL-specific.
What do y'all think?
I think it should work, but only Rick can tell... :)
--
Roger
--
MySQL General Mailing List
For list
13 matches
Mail list logo