From: Martijn Tonies Date: March 21 2006 9:01am Subject: Re: RIGHT JOIN better than INNER JOIN? List-Archive: http://lists.mysql.com/mysql/195998 Message-Id: <008a01c64cc5$fa4d5c40$cd02a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > I apologize if this is a naive question but it appears through my > testing that a RIGHT JOIN may out perform an INNER JOIN in those cases > where they would produce identical result sets. i.e. there are no keys > in the left table that do not exist in the right table. > > Is this true? If so, it this peculiar to MySQL or would this be true > with almost all database servers? i.e. Oracle, DB2, MSSQL, etc. Use the join that is appropriate for your query, do not use a different one. If speed isn't OK, then bug the guys that do the implementation, but don't start changing the query that _might_ return a different result if, for example, someone else starts working at the application and figures "hey, this is a right join, so it's optional" etc ... Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com