Quote:
Originally Posted by Tinkster
I can't see an actual query ...
Cheers,
Tink
|
Well my qestion really has more to do with the MySQL '/etc/my.cnf' file and/or MySQL server parameters to make it go faster. I've already got the query:
--get the frequency of each name field and store it in a table
create table nameCount engine = myisam
select name, count(*) as freq
from redundantTable
group by name;
go
--now get the id's for first instance of a 'name' value
create table oneId engine = myisam
select (
select r.id
from redundantTable r
where r.id = n.id
limit 1
) as id
from nameCount n
where n.freq > 1;
go
--final (result) table, gives only one instance of 'name' and 'description'
create table final engine = myisam
select o.id, r.name, r.description
from oneId o, redundantTable r
where o.id = r.id;