Thanks for the advice Steven, I'll bear it in mind and do some reading. Graham
> -----Original Message----- > From: Steven Roussey [mailto:[EMAIL PROTECTED] > Sent: 13 November 2004 02:52 > To: 'Graham Cossey' > Cc: [EMAIL PROTECTED] > Subject: RE: Help with query performance anomaly > > > For production systems, I would never let the mysql optimizer > guess a query > plan when there are joins of big tables and you know exactly how it should > behave. Once you think a query is finished, you should optimize > it yourself. > Use STRAIGHT_JOIN and USE INDEX as found here in the manual: > > http://dev.mysql.com/doc/mysql/en/JOIN.html > > STRAIGHT_JOIN is identical to JOIN, except that the left table is always > read before the right table. This can be used for those (few) cases for > which the join optimizer puts the tables in the wrong order. > > http://dev.mysql.com/doc/mysql/en/SELECT.html > > The use of USE INDEX, IGNORE INDEX, FORCE INDEX to give the > optimizer hints > about how to choose indexes is described in section 14.1.7.1 JOIN Syntax. > > -steve-- > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]