Hi,
You are a bit on the wrong track - a join is a purely temporary thing, and
it would be an error for it to modify the database.
Perhaps what you are thinking of is a 'View', where the results of a select
appear like a table to the user. MySQL doesn't support them (yet).
Your command was trying to churn out 8077 * 8077 = 65,237,929 rows each with
298 columns. No wonder it took a long time.
Regards
Quentin
-----Original Message-----
From: Paul Krohn [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 8 February 2001 14:06
To: [EMAIL PROTECTED]
Subject: JOIN trouble
hi there. i've just joined the list. I took a look through the archives
and I think I've got the whole concept of JOIN wrong, but here goes.
Here's the task: I've got three tables, each with the same number of
records (8077, fwiw). they have 149, 149, and 80 columns.
There are a few columns that appear in all the tables and have identical
content; LOGRECNO is the field that uniquely identifies each record.
What I'd like to do is combine the tables, so that I have 1 table that
is 368 columns wide.
here's what I did, hoping to join the first and second tables:
select * from 2000sampledata1 LEFT JOIN 2000sampledata2 on
2000sampledata1.LOGRECNO = 2000sampledata2.LOGRECNO ;
This causes the database to churn for about 40 minutes (it's a 300 MHz
system with mirrored SCSI disks). In addition, the tables are not, as
far as I can detect, altered in any way. After this command is done, the
database files are the same size in bytes and appear to have not been
modified.
I feel like I'm totally on the wrong track ... any suggestions about how
to accomplish this seemingly simple task would be most appreciated.
--
Paul Krohn - Systems Engineer
San Francisco Chronicle
415-777-7884 - [EMAIL PROTECTED]
---------------------------------------------------------------------
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
The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended
recipient, you are asked to respect that confidentiality and not
disclose, copy or make use of its contents. If received in error
you are asked to destroy this email and contact the sender immediately.
Your assistance is appreciated.
---------------------------------------------------------------------
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