Re: Fastest way to get table records' number

From: Date: Wed, 19 Mar 2008 13:51:04 +0000
Subject: Re: Fastest way to get table records' number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-271783@lists.php.net to get a copy of this message
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/

« previous php.general (#271783) next »