On Mon, 2004-01-05 at 20:14, Daniel Crookston wrote:
> Ewww, sub-selects.  Not a very efficient use of the DB, is it?  I was under
> the impression that it's just as fast (with MySQL at least) to just do the
> sub-select yourself in the code instead of relying on the database to do it.

Think about if for a moment. Such a comment is obviously wrong. Which is
better, copying 100,000 rows (possible across a network connection) and
then building the next set of queries by hand, or letting all the data
stay in the DB itself where it can be optimized by people who's
specialty is doing such? Especially if many of those rows ending being
irrelevant to the result? Sub-select exist for a reason, Monty's
prejudices aside. Sure, sub-selects shouldn't be used in every query,
but a good programmers is paid to know when they are appropriate.

-- 
Stuart Jansen <[EMAIL PROTECTED], AIM:StuartMJansen>

âThe programmer, like the poet, works only slightly removed from pure
thought-stuff. He builds his castles in the air, from air, creating by
exertion of the imagination. Few media of creation are so flexible, so
easy to polish and rework, so readily capable of realizing grand
conceptual structures.â       -- Fredrick Brooks, Mythical Man Month

Attachment: signature.asc
Description: This is a digitally signed message part

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to