MySQL Forums
Forum List  »  Newbie

Re: Query advice - Multiple LEFT JOINS to same table or not??
Posted by: Joby Tyler
Date: March 25, 2005 09:31AM

Chris - thanks for taking the time to reply - thats essentially what I'm doing for displaying a single pigeon (or a list of single pigeons) and thats seems fine and performs OK.

The complication occurs in the "breeding pairs" section because the initial query is on a "pairs" table, which needs two left joins to the pigeon table to get the details for the 2 birds in the pair, and would then need 6 joins (as above) per bird to get all the pedigree details - hence my 14 (it keeps going up!) left joins theory.

The 14 left joins will work I guess (bit slow though?) just a question of whether its better to do it with smaller queries (2 of above maybe) in my PHP display loop.

Or can I do it all in several queries before the PHP display loop - or any more ideas on the best way to do it?

Joby

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.