MySQL Query still executing after a day..?

Posted by Matt Jarvis on Stack Overflow See other posts from Stack Overflow or by Matt Jarvis
Published on 2010-06-01T14:29:25Z Indexed on 2010/06/01 14:33 UTC
Read the original article Hit count: 188

Filed under:
|
|
|

Hi - I'm trying to isolate duplicates in a 500MB database and have tried two ways to do it. One creating a new table and grouping:

CREATE TABLE test_table as SELECT * FROM items WHERE 1 GROUP BY title;

But it's been running for an hour and in MySQL Admin it says the status is Locked.

The other way I tried was to delete duplicates with this:

DELETE bad_rows.* from items as bad_rows inner join ( select post_title, MIN(id) as min_id from items group by title having count(*) > 1 ) as good_rows on good_rows.post_title = bad_rows.post_title;

..and this has been running for 24hours now, Admin telling me it's Sending data...

Do you think either or these queries are actually still running? How can I find out if it's hung? (with Apple OS X 10.5.7)

© Stack Overflow or respective owner

Related posts about mysql

Related posts about osx