Back

SQL Explained

Executed SQL
EXPLAIN SELECT ••• COUNT(`taggit_taggeditem`.`id`) AS `num_times` FROM `taggit_tag` LEFT OUTER JOIN `taggit_taggeditem` ON (`taggit_tag`.`id` = `taggit_taggeditem`.`tag_id`) WHERE `taggit_tag`.`id` IN (SELECT U0.`tag_id` FROM `taggit_taggeditem` U0 INNER JOIN `django_content_type` U1 ON (U0.`content_type_id` = U1.`id`) WHERE (U1.`app_label` = 'benchmark' AND U1.`model` = 'benchmark' )) GROUP BY `taggit_tag`.`id`, `taggit_tag`.`name`, `taggit_tag`.`slug` ORDER BY NULL
Time
0.36 ms
Database
default
ID SELECT_TYPE TABLE TYPE POSSIBLE_KEYS KEY KEY_LEN REF ROWS EXTRA
1 PRIMARY taggit_tag ALL None None None None 40 Using where; Using temporary
1 PRIMARY taggit_taggeditem ref taggit_taggeditem_3747b463 taggit_taggeditem_3747b463 4 spike.taggit_tag.id 2
2 DEPENDENT SUBQUERY U1 const PRIMARY,app_label app_label 204 const,const 1
2 DEPENDENT SUBQUERY U0 ref taggit_taggeditem_3747b463,taggit_taggeditem_e4470c6e taggit_taggeditem_3747b463 4 func 2 Using where