
我现在设计的表结构为:



想请教下这样的表结构是否合理,是否有更好的方式? 然后我该怎么查询效率较高?
我现在用的子查询来查询,但效率实在太低了.
SELECT id,title from sound where status=50 and (SELECT count(id) from sound_cate where sound_id=sound.id and cate_id in (8,1,9,14))=3 order by id desc 1 xuanbg 2021-02-19 11:21:57 +08:00 你这个多对多的不适合用分类,用 tag 更好。 |
3 zhuangjia 2021-02-19 11:51:01 +08:00 |
nbsp; 4 zjttfs OP |