mySQL table joins are slow, need rebuild?

From: Date: Tue, 27 Feb 2001 22:21:53 +0000
Subject: mySQL table joins are slow, need rebuild?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41880@lists.php.net to get a copy of this message
hi, i have a query that is comparing a table with 1235 rows with another that has 635 rows. The query looks like this: $res = mysql_query("select cust_info.ID, cust_info.first_name, cust_info.last_name, cust_info.address, cust_info.datestamp from cust_info, cust_order_info where cust_info.ID=cust_order_info.cust_id order by $mainsort" . $order . ";"); The parse time with the join is 19 seconds. I have to do a join because there a different methods that the user must be able to sort by. The parse time on the cust_info table alone, with a order by is .95 seconds. Now, we have a RPM binary of mySQL, and when performing the query, not only is it slow, but sometimes will dump its core. Does anyone see anything wrong with the query, or should we consider building the source on our box.. or? Thanks.

« previous php.general (#41880) next »