RE: [PHP4BETA] A question about PHP and Mysql

From: Date: Thu, 06 Apr 2000 20:25:14 +0000
Subject: RE: [PHP4BETA] A question about PHP and Mysql
Groups: php.version4 
Request: Send a blank email to php-version4+get-13250@lists.php.net to get a copy of this message
Yes. I would look to MySQL news/support mailing list? Worse case scenario you could maintain an auxilary table which maintained the count (number of insertions) for every INSERT or DELETE you would update the auxilary table. Workaround, ya know ;) michael -----Original Message----- From: Alex zhang [mailto:cd_av2av2@yahoo.com] Sent: Thursday, April 06, 2000 1:06 PM To: Michael Nino; php4beta@lists.php.net Subject: RE: [PHP4BETA] A question about PHP and Mysql I have tried it and checked it with Explain(looks right). Same result. It acturally occurs when you have too much entries return in big tables pls try! Anyway, thanks alex --- Michael Nino <mnino@Insight.com> wrote: > 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@yahoo.com] > Sent: Thursday, April 06, 2000 7:17 AM > To: php4beta@lists.php.net > 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@lists.php.net > For additional commands, e-mail: > php4beta-help@lists.php.net > To contact the list administrators, e-mail: > php4beta-admin@lists.php.net > __________________________________________________ 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@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#13250) next »