i solved the problem...
for the ones, who wants to know:
only creating an index on artikelnummer on both tables made the query beeing ready after 2 seconds again :-)
Oliver
On Wed, 15 Sep 2004 00:38:59 +0200, Oliver Schiessl <[EMAIL PROTECTED]> wrote:
MySQL 3.23.58:
ive got 2 tables with ca. 30000 entrys each
now i wanna join, if one entry is in the one table, which isnt in the other one
so this will be a normal join:
Tabelle1: Artikelnummer, blah, blah, blah
Tabelle2: Artikelnummer, blah, blah, blah
select Tabelle1.Artikelnummer from Tabelle1 LEFT JOIN Tabelle2 ON Tabellle1.Artikelnummer=Tabelle2.Artikelnummer where Tabelle2.Artikelnummer is null
now i have the problem that this join on my Xeon 2.4GHz with Serial-ATA-disks after 1 1/2 hours isnt ready?!!?
a test with 2 tables with ca. 1000 entries each gave a response after only 2 seconds.
now... can someone tell me... isnt it faster possible??? i am at least faster with some b*lls**t like...
$query = "select artikelnummer from tabelle1";
while ($row = mysql_fetch_array($result)) {
$query = "select artikelnummer from tabelle2 where artikelnummer='".$row['artikelnummer']."'";
if (mysql_fetch_array(mysql_query($query))) echo $row['artikelnummer']
}
Oliver
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]