Re: Fastest way to get table records' number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shelley wrote:
What do you think is the FASTEST sql to get the total number of a table with millions of records?

Generally speaking 'select count(1) from table' is the quickest way, but it really depends on the database and storage engine you're using. Your best bet is to look at the documentation for the database you're using or find a mailing list for it.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux