hi Faisal, I think there are no huge differences between using the tow ways , but I think you should think in this case in the maintainability of your code, if another developer read the query which join 8 tables , may be he confused , So I will use PHP as glue.
hafez :) On 3/28/07, Al-Faisal El-Dajani <[EMAIL PROTECTED]> wrote: > > Hello guys, > > I was just trying to write a complex SQL statement and it came to my mind, > what would be more effecient? one huge monolithic statement with outer joins > and subqueries and all? or break it down to 3 or 4 consecutive SQL > statements and use PHP to glue them together? > I'm using MySQL with InnoDB transaction manager, the mysql api for php > (not mysqli, i don't know if this matters), and almost all fields that i > need for join are indexed. Is it better to do one statement that joins 8 > tables and has 2 levels of subqueries, or break it down to 4 seperate > statements and join them with php? > > -- > Al-Faisal El-Dajani > Phone: +962-7-77 799 781 > P.O Box: 140056 > 11814 Amman, Jordan > > > -- Hafez A.Ahmad Amman-Jordan mobile:962-785259011 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Jordan PHP Users Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/JoPHP http://Jolug.org/ -~----------~----~----~----~------~----~------~--~---
