Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

performance left outer join very poor 1

Status
Not open for further replies.

hos2

Programmer
May 6, 2002
418
NL
I changed a query from an equal join to a left outer join but then the performance is suddenly 10 times as slow ??

Is this normal or do I miss something ??

old code
Code:
$query1="SELECT * FROM ";
	$query1=$query1 . "clienttable,contacttable AS co1 WHERE co1.coclid=clid ";
	$query1=$query1 . " AND clname like '$alfabetisch%' ";
	$query1=$query1 . " order by $o";

new code
Code:
$query1="SELECT * FROM ";
	$query1=$query1 . "clienttable left outer join contacttable AS co1 ON co1.coclid=clid WHERE ";
	$query1=$query1 . " clname like '$alfabetisch%' ";
	$query1=$query1 . " order by $o";



I only have a few thousand records but still I have to wait for 30 seconds with the left outer join :(

 
clname is from the clienttable
 
OK the index did the trick bu I still find it fuzzy that it had was so slow by just altering it to a left outer join :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top