Hi zoltan if you know difference between inner join and left join, you can conclude than maybe there are a lot of rows in table1 which do not verify you join condition.
This example show you that the result is different and and add'in where clause if you want to transform the left join result like then inner join one : mysql> select * from a; +------+---------+ | id | txt | +------+---------+ | 1 | a test1 | | 2 | a test2 | | 3 | a test3 | +------+---------+ 3 rows in set (0.03 sec) mysql> select * from b; +------+---------+ | id | txt | +------+---------+ | 1 | b test1 | | 2 | b test2 | +------+---------+ 2 rows in set (0.00 sec) mysql> mysql> mysql> select * from a inner join b on a.id=b.id; +------+---------+------+---------+ | id | txt | id | txt | +------+---------+------+---------+ | 1 | a test1 | 1 | b test1 | | 2 | a test2 | 2 | b test2 | +------+---------+------+---------+ 2 rows in set (0.00 sec) mysql> select * from a left join b on a.id=b.id; +------+---------+------+---------+ | id | txt | id | txt | +------+---------+------+---------+ | 1 | a test1 | 1 | b test1 | | 2 | a test2 | 2 | b test2 | | 3 | a test3 | NULL | NULL | +------+---------+------+---------+ 3 rows in set (0.00 sec) mysql> mysql> mysql> select * from a left join b on a.id=b.id where b.txt is not null; +------+---------+------+---------+ | id | txt | id | txt | +------+---------+------+---------+ | 1 | a test1 | 1 | b test1 | | 2 | a test2 | 2 | b test2 | +------+---------+------+---------+ 2 rows in set (0.00 sec) Hope that helps. Mathias Selon Jigal van Hemert <[EMAIL PROTECTED]>: > From: "Gyurasits Zoltán" > > > I have a speed problem with LEFT JOIN condition. > (...) > > Why?? Somebody can help me? Tnx!! > > You will probably get a lot more useful response if you include the table > structure, the complete query/queries and the output of EXPLAIN for each > query (just put EXPLAIN in front of the SELECT. It will give you information > about the execution path that MySQL came up with). > > Regards, Jigal. > > > -- > 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]