O' MyT SQL wizards!
I'm a total newbidiot w/ regard to MySql. I bought the O'Reilly
book and it's been a big help, but I have a problem that book
doesn't even gloss-over:
One table has a (large) list of developers (100,000+), each of
which can be a member of 0-5 project teams.
Another table is a list of project teams (400-500 projects).
I need to be able to (quickly!!!) do a:
SELECT NAME FROM developers WHERE project1='xyz' OR project2='xyz OR...
I can do this now, but it takes 3-5 seconds (real) and chews up the
CPU and spits it out the window of the PCI bus...
The O'Reilly book has just enough info to indicate that I need
to perform a "JOIN" but they don't make any effort to explain what
that is or what it does (physically or logically). In fact, the
O'Reilly book says (in one of the early chapters) that you do this
with FOREIGN KEY statements - in MySql - obviously, the book was
a learn-by-writing-about-it exercise.
YIKES!
Can someone offer a clue - or point me at a good book - or an example?
It's many<<->>many so it's probably as simple as:
CREATE TABLE NameProj (name TEXT(64) PRIMARY KEY); // Intersect records
SELECT developers.name, project.name FROM Something WHERE ... JOIN ....
or something like that, right? Help a poor idiot!
Thanks in advance,
:P
---------------------------------------------------------------------
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