Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 200004

RE: [PHP4BETA] A question about PHP and Mysql From: Michael Nino (mnino <email protected>)
Date: 04/06/00

That's more than I have ever counted. But you might try counting on a single
column:

select count(a) from tablea where a='tom';

Or trying using EXPLAIN (see
http://www.mysql.com/php/manual.php3?section=EXPLAIN).

good luck!
michael

-----Original Message-----
From: Alex zhang [mailto:cd_av2av2 <email protected>]
Sent: Thursday, April 06, 2000 7:17 AM
To: php4beta <email protected>
Subject: [PHP4BETA] A question about PHP and Mysql

Hi,
   Maybe this should be a question about Mysql.But I
met them in my PHP code.
   For too big table in Mysql ex 3 million rows, even
you added index for some field , it is very slow
to count rows.Like this
 select count(*) from tablea where a='tom';
I have index for "a" field.But it always took about
5-7 seconds to finish such query.
  Who has idea about that?

thankx in advance

Alex

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>