參考網址1
重點:
According to the MySQL documentation this is most efficient if you're using a MyISAM table (which is the most usual type of tables used):
$result = mysql_query("SELECT COUNT(*) FROM table");
參考網址2
重點:
SELECT COUNT(*) FROM test_table;
SELECT COUNT(id) FROM test_table;
SELECT COUNT(1) FROM test_table; => 最快
沒有留言:
張貼留言