select title.id,title.`name` from title where title.id not in (select user_tag.tagid from user_tag )
可以改为
select title.id,title.`name`
from title
left join user_tag on user_tag.tagid = title.id
where user_tag.id is null
select title.id,title.`name` from title where title.id in (select user_tag.tagid from user_tag )
可以改为
select title.id,title.`name`
from title
inner join user_tag on user_tag.tagid = title.id