Archive for the ‘MySQL’ Category

Query ‘SHOW PROCESSLIST’

Monday, October 3rd, 2011

SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;

gives the same info (in recent MySqls) and can be filtered;

checking for duplicates

Friday, May 8th, 2009

if for example, you want to apply a unique index, but you can’t because there’s duplicates in the table.

SELECT name FROM mytable GROUP BY name HAVING COUNT(*) > 1;