MySQL问题查阅
记录问题
#Mysql 的COUNT(*)和COUNT(1)有什么区别
5.6 的官方文档中介绍如下:
InnoDBhandles SELECTCOUNT(*)and SELECTCOUNT(1)operations in the same way. There is no performance difference.
所以答案是没区别。COUNT(name)会算非空的个数。
#Count(*) 和 limit
属于是我自己智障了,测试了一下
1 | select count(*) from bbot_chat_intent_message limit 0,10 |
是能拿到数据的,但是:
1 | select count(*) from bbot_chat_intent_message limit 100,10 |
就不行了,感觉有些地方的分页有问题,到时候要修复一下。