yegorpb
11-20-2006, 12:36 AM
I just moved my site to a different dedicated box.... everything works fine, except for 2 pages, which use a join to compare 2 tables. the code is as follows:
$query = "SELECT * from links1, phpbb_users WHERE links1.username = phpbb_users.username AND status = 0 AND $link_types ORDER BY posttime";
On my old box... he page that has this code took 0.003s to execute... . On my new box, it takes 6.3s.
If I change the code to this, it goes down to 0.003 again:
$query = "SELECT * from links1 WHERE status = 0 AND $link_types ORDER BY posttime";
but then my script is broken.
The only different between the 2 servers is version of php/mysql. Old was running php4/mysql4 new is running php5/mysql5.
Could the versions of php/mysql be responsible for this, or is this something different?
$query = "SELECT * from links1, phpbb_users WHERE links1.username = phpbb_users.username AND status = 0 AND $link_types ORDER BY posttime";
On my old box... he page that has this code took 0.003s to execute... . On my new box, it takes 6.3s.
If I change the code to this, it goes down to 0.003 again:
$query = "SELECT * from links1 WHERE status = 0 AND $link_types ORDER BY posttime";
but then my script is broken.
The only different between the 2 servers is version of php/mysql. Old was running php4/mysql4 new is running php5/mysql5.
Could the versions of php/mysql be responsible for this, or is this something different?
