Never been to DZone Snippets before?

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

Analyse a MySQL Query for inefficiencies (See related posts)

// description of your code here

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;

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts