Hi,

I have a table with a few 100K records. I have an index on column PiNumber - but when I run the following query in phpmyadmin it will run for
30+ minutes ...

Code MySQL:
SELECT PiNumber
FROM data_table 
WHERE PiNumber IN (  
    SELECT PiNumber  
    FROM data_table  
    GROUP BY PiNumber 
    HAVING COUNT(PiNumber) > 1  
    )  
ORDER BY PiNumber

But ... when I just do this simple query it runs in under a second

Code MySQL:
SELECT PiNumber 
FROM data_table
GROUP BY PiNumber
HAVING COUNT( PiNumber ) >1

When i run show processlist, the query is stuck in state 'Sending data'
any thoughts/suggestions?