Hi!

On Mar 20, Lorderon wrote:
> I have 3 tables to join when the last one is a Full-Text table (ft_table)..
> I do the next join:
> 
> SELECT id,title FROM table1 LEFT JOIN table2 USING (id) INNER JOIN ft_table
> USING (id) WHERE ...
> 
> But MySQL selects the primary key (id) to join the ft_table, which makes the
> query run a lot of time and gives wrong results according to the MATCH
> AGAINST search..

Please provide a complete repeatable test case for this.
 
> I found that making the join as this:
> 
> SELECT id,title FROM table1,table2,ft_table WHERE table1.id=table2.id AND
> table2.id=ft_table.id AND ...
> 
> gives the wanted results according to MATCH AGAINST, but leave out rows that
> don't exist in table2 (the join there was LEFT JOIN)..
>
> 1- Is there a way to join the full-text table and using the full-text index,
> so the query will not last long?

You may use USE INDEX / IGNORE INDEX in the FROM clause
(see the manual)
 
> 2- Is there a way to make something like LEFT JOIN using list of tables
> seperated by comma (table1,table2,..)?

no.
 
> 3- Is there a performance difference between making INNER JOIN or by making
> list of tables seperated by comma (table1,table2,..) with using WHERE
> clause?

no.

Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/  www.mysql.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to