Hi,

"Sergei Golubchik" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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.

That was wierd.. now I get reasonable search times..

> > 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.

Then I'll build the query using list of tables seperated by comma
(table1,table2,..)
I also found that when you use JOIN with full-text, MySQL don't
automatically sort the results by the coefficient of the full-text... when
you use list of tables seperated by comma MySQL sorts it correctly...

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

Thanks for the help :-)
-Lorderon.



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

Reply via email to