If that were a valid SQL statement, I would agree with you. What you wrote
**only** functions through a MySQL-specific SQL extension that permits
non-aggregated, non-grouped columns to exist in the SELECT clause.
I do not understand why you believe that a GROUP BY test will prove any
sort of performance gain for his original INSERT problem. It took just
over 24 hours to do an INSERT IGNORE to add just about 1000 rows to a 77
million row table. What metric of that performance will your GROUP BY test
help to prove?
Unimin Corporation - Spruce Pine
"Mikhail Entaltsev" <mentaltsev@stripped> wrote on 08/27/2004
> > You _could_ try adding an identical primary key to the stat_in table
> > you have on the 321st_stat table. However, since we need all of the
> > from stat_in in the results, I am not sure that it will help speed up
> > join (because it's a left join). Even though I think the index would
> > ignored, it is worth a try to see if it would make a difference with a
> > EXPLAIN..
> But it should speed up grouping by PRIMARY KEY in:
> insert into 321st_stat select * from stat_in group by