網路城邦
上一篇 回創作列表 下一篇   字體:
some of MySQL
2011/08/22 17:24:24瀏覽82|回應0|推薦0
#
LIMIT:

Although the LIMIT clause can be useful, its implementation is very basic. In order to retrieve
the information, mysqld processes a query as if there were no LIMIT, and stops when it
reaches the row count it needs to


也就是说并不是我先前所想的那样带回所有数据然后选取需要的,而是在满足它需要后就停止了,也就是比如LIMIT 3的话,在扫描到第3行数据时候就停止了,这种情况相对于单纯的
select * from table limit N 来说,如果是 select * from table order/group by filedN limit N 的话则会带回所有数据排序处理后再选择


#
資料庫常見命名規則
http://www.neo.com.tw/archives/275
( 休閒生活其他 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=Tyue&aid=5569147