IPB

Career Guidance | Technical Jobs | Walkin Interview & Job Fairs | Fresher Jobs

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
difference on two queries which is better in terms of performance
Misha Singh
post Nov 3 2009, 04:32 PM
Post #1


Advanced Member
***

Group: Members
Posts: 8,266
Joined: 23-November 08
Member No.: 6,521



sql 1

PHP Code:





$SQL=="select table1.* , table2.* from table1

left join table2 on (table2.id = table1.foreignkey)

where

table1.idsofmulitiple = whateveralue

and

table2.fieldsofidentity = whateveralue

"
;








vs

sql2

PHP Code:





$SQL=="select table1.* , table2.* from table1

left join table2 on (table2.id = table1.foreignkey and table2.fieldsofidentity=whatevervalue)

where

table1.idsofmulitiple = whateveralue


"
;








Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th March 2010 - 10:55 PM