sorry, I guess I got my answer. the example that I wrote was that exactly
the same query that I had in my program. in the real query I had 3 tables. I
read the mysql note and I found that location of the table to write the link
is important for optimization. by changing the sequence of the tables, the
query worked faster.

----- Original Message ----- 
From: "Mojtaba Faridzad" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 19, 2003 3:20 PM
Subject: LEFT join


> Hi,
>
> SELECT A.fld1, A.fld2, B.fld1 FROM A LEFT JOIN B ON A.lnkfld = B.lnkfld
> LIMIT 100;
>
> A and B are big table and this command is very slow. If I use INNER JOIN,
is
> very fast but I loose some records. How I can write a faster LEFT JOIN
> command?
>
> Thanks
>
>
> -- 
> 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]

Reply via email to