Hi Sebastian,

If the new cds_catalog is created with primary key, this should
produce a duplicate key error for the second iteration of the second
table, as the data selected is from cds_catalog alone, but joining two
tables causing cartisian joint to be formed(n*(m-
t1.field<>t2.field)),
each time the same set of data being inserted.

reg,

Eldo.



On Mon, 27 Sep 2004 14:07:54 +0200 (CEST), Tobias Asplund
<[EMAIL PROTECTED]> wrote:
> On Mon, 27 Sep 2004, Sebastian Geib wrote:
> 
> > >> I have a huge problem with the following insert statement:
> > >> INSERT INTO cds_catalog
> > >>         SELECT cds_stage.cds_catalog.*
> > >>         FROM cds.cds_catalog, cds_stage.cds_catalog
> > >>         WHERE cds_stage.cds_catalog.prodid<>cds.cds_catalog.prodid;
> > >>
> 
> 
> Look at this query, it will create a huge table as a result, as an
> approximisation the table created will have the number of rows in both tables
> multiplied with eachother.
> 
> 
> > Has anyone else any idea? I tried all Google resources I could get hands
> > on, but they were all about disk space on the tmp partition or repairing
> > the db which both isn't the problem here.
> 
> Are you sure 60GB is enough? Look above, say you have 1000 rows in each
> table, the result could be up to 1000000 rows.
> 
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to