全文链接: https://www.modb.pro/db/23201
SELECT
`post_title`,
`post_date`
FROM
post
WHERE
`post_status` = 'publish'
ORDER BY
view_count desc
LIMIT
5, 5
SELECT
*
FROM
post
WHERE
post_status = 'publish'
ORDER BY
view_count desc
LIMIT
5, 5
SELECT
`post_title`,
`post_date`
FROM
post
WHERE
`post_status` = 'publish'
ORDER BY
view_count desc,
ID asc
LIMIT
5, 5
MySQL 5.5 没有这个优化,所以也就不会出现这个问题。
(1) SELECT
( 2) DISTINCT <select_list>
( 3) FROM <left_table>
( 4) <join_type> JOIN <right_table>
( 5) ON <join_condition>
( 6) WHERE <where_condition>
( 7) GROUP BY <group_by_list>
( 8) HAVING <having_condition>
( 9) ORDER BY <order_by_condition>
( 10) LIMIT <limit_number>
......
查看全文请点击文章顶部链接
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。