Re: Fastest way to get table records' number
| From: | Daniel Brown | Date: | Wed, 19 Mar 2008 13:42:07 +0000 |
| Subject: | Re: Fastest way to get table records' number | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-271778@lists.php.net to get a copy of this message | ||
On Tue, Mar 18, 2008 at 11:43 PM, Shelley <myphplist@gmail.com> 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