Re: [PHP] Fastest way to get table records' number

[email protected] ("Daniel Brown")
Newsgroups php.db,php.general
Message-ID <[email protected]>
On Tue, Mar 18, 2008 at 11:43 PM, Shelley <[email protected]> wrote:
> Hi all,
>
>  What do you think is the FASTEST sql to get the total number of a table
>  with millions of records?

    That question would be better on the PHP-DB list, so for archive's
sake, I'm CC'ing that list.

    $sql = "SELECT COUNT(*) FROM your_table";

-- 
</Daniel P. Brown>
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.