[thelist] MySQL optimization

Steve Lewis nepolon at worlddomination.net
Tue Sep 27 14:00:22 CDT 2005


Matt Warden wrote:

>> select DISTINCT sectionid
>> from SectionMembers LEFT JOIN Sections ON
>>     Sections.id=SectionMembers.sectionid
>> where Sections.instid = '%bindVal01%'

> Can you explain why you are using a left join here?

I am inheriting this query.  As I noted in my last reply, it occurs to 
me that I can save some work by using an inner join in this case.  A 
left join doesn't really make sense.

sectionid and instid are properly keyed & indexed.

-- 
SteveL


More information about the thelist mailing list