Analyse a MySQL Table for Inefficiencies
SELECT * FROM tags PROCEDURE ANALYSE()
DZone Snippets > offspinner > optimisation
12309 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
SELECT * FROM tags PROCEDURE ANALYSE()
EXPLAIN SELECT t2.dbid, t2.tag, COUNT(t2.dbid) * 20 AS match_count FROM tags AS t1, tags AS t2 WHERE t1.dbid = '105318' AND t2.tag = t1.tag AND t1.dbid != t2.dbid GROUP BY t2.dbid ORDER BY match_count;