How to use MySQL Found_Rows() in PHP?

前端 未结 7 879
温柔的废话
温柔的废话 2020-12-03 16:55

I try to avoid doing Count() because of performance issue. (i.e. SELECT COUNT() FROM Users)

If I run the followings in phpMyAdmin, it is ok:



        
7条回答
  •  抹茶落季
    2020-12-03 17:35

    Do you really think that selecting ALL rows from tables is faster than counting them?
    Myisam stores a number of records in table's metadata, so SELECT COUNT(*) FROM table don't have to access data.

提交回复
热议问题