>
> > Exactly - I can't create an index on the table until I remove the
> > duplicate records.
>
> I was under the impression you were seeing this during a myisamchk run -
> which indicates you should *already* have a key on that field. Or am I
> interpreting that wrong?
>
>
I'm trying to rebuild an index after disabling all keys using myisamchk and
adding all 144 million records, so there is no current index on the table.

> I suppose I could create a non-unique index on the key
> > fields, and try that, but then I'd have to (1) create that index, and
> then (2) do
> > the full table scan query.
>
> No, if you create the index, you will not do a full tablescan afterwards.
> That's the whole point of an index :-)
>
>
But in order to create the index, mysql has to do a full table scan AND a
sort, which for 144 million records, is going to take a very long time.  So
an un-indexed full table scan without an index (i.e ..."HAVING count(*)>1")
 will actually take less time.

So like I said, it would be intuitive and helpful if the tool finding the
dup records actually provided enough info to view, find, and fix them so I
don't have to index, sort, or table scan the table a second time.

Reply via email to