本页二维码,扫一扫分享到朋友圈
朋友圈

like优化


阅读404 评论0 赞 63返回首页    go 编程与技术  go mysql


SELECT `id` FROM `table_xxx`  WHERE ( (tags like "%,139,%" ) ) ORDER BY rand() LIMIT 5

SELECT `id` FROM `table_xxx` AS t1 JOIN (SELECT ROUND(RAND() * (SELECT MAX(id) FROM `table_xxx`)) AS id1) AS t2 WHERE t1.id >= t2.id1 and t1.tags like "%keyword%" ORDER BY t1.id asc LIMIT 5


  上一篇:go mysql fulltext全文索引优缺点
  下一篇:go sql order by rand随机数据优化与性能对比


评论


用QQ登录管理/创建网站 用微博登录管理/创建网站   发布于:12-12