Hi there,
I have some trouble with the syntax of join query and some perfomance isues.
I did split my data due to the rules of normalisation. So there is a website
table and a comment table and I would like to find out if the user with the
id '10215' has a stored comment or website.
Here is my stmt:
SELECT w.website, c.comment
FROM user_websites w
LEFT JOIN user_comments AS c ON c.user_id = '10215'
WHERE w.user_id = '10215'
So what if comments contains 1 million entries. Or what if I have 10 such
tables and would have to make a left join on each of them? I fear that the
performance would suffer. is there a better way to do this in one stmt?
Thanx for any help,
Andy
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php