Re: JOIN Very SLOW...

From: Date: Wed, 28 Nov 2001 10:15:46 +0000
Subject: Re: JOIN Very SLOW...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14649@lists.php.net to get a copy of this message
I would suggest changing COUNT(*) to COUNT(properties.PropertyID) Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key ----- Original Message ----- From: "Martin E. Koss" <mek@mek.co.uk> To: <php-db@lists.php.net> Sent: Wednesday, November 28, 2001 10:09 AM Subject: [PHP-DB] JOIN Very SLOW... The following does work but it extremely slow. $phselect = "select COUNT(*) AS phTotal from properties LEFT JOIN propertydetails ON properties.PropertyID=propertydetails.PropertyID where ((propertydetails.Image1Desc='') AND (properties.PropertyType='$PropertyType'))"; $phresult = mysql_query ($phselect,$conID); while ($phrow = mysql_fetch_array($phresult)) { $phTotal = $phrow["phTotal"]; PRINT "<td align=\"right\">$phTotal</td>\n"; } // end WHILE Is there an obvious problem here and can anyone help? Martin E. Koss M: 07946-706459 E: mek@mek.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#14649) next »