There will hopefully be some MySQL guru to confirm if I am right or wrong. I
also did the "inner product" version instead of JOIN's, but moved to JOIN's
that are more logical in the way I work with the tables I have.

/Peter

-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 11:00 AM
To: Peter Lauri
Cc: mysql@lists.mysql.com
Subject: Re: 1 to many relationship

Peter Lauri wrote:
> [snip "Chris"]
> The 'where' clause cuts that down to only matching records between the 
> tables. Without the where, you'd end up with lots of rows but with the 
> where it will be fine.
> [/snip]
> 
> Yes, it cuts it down to that number of records in the end, so the final
> result set will just be a few rows that match the 'WHERE'. But the
internal
> process of MySQL do merge all tables and then chooses the records that
> matches the 'WHERE' clause.

I don't know enough about mysql internals to debate that so I'll take 
your word for it.

'Explain' doesn't give enough information about what happens behind the 
scenes so I'm not sure how to prove/disprove that and I don't know of 
any tools that would show you that (if there is let me know!).

Having said all of that I've never had a problem doing it the way I 
mentioned.. ;)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to