This query was pretty fast avg. 1-3 s / search

SELECT m1.id FROM table1 AS t1 JOIN table AS t2 ON m1.textid=m2.id WHERE match(t2.text) AGAINST('$searchString' IN BOOLEAN MODE);

I also added an index on table1.textid and table2.id.

Is there a way to optimize this query even more?

// Fredrik Carlsson


Fredrik Carlsson <[EMAIL PROTECTED]> wrote: > Hi, > I have a question regarding to search with fulltext on table and fetch > the data from another. > > Table one: > id, textid, name, number, url > > Table two: > id, text > > On table two there is a fulltext index. > > These two tables recently was one table, but i had to split them due to > the amount of data. > textid in table one is refering to id in table two, in order to keep > person and text together. > > Before the split my search question looked like this: > > select id,name,number,url match(text) > against('$searchString') as relevance from table where > match(text) against('$searchString' IN BOOLEAN MODE) > having relevance > 0.9 order by relevance DESC > > But due to the split of the table i cant really figure out how to make > the question. > I want to search with fulltext on table2(text) and fetch all the > corresponding data from table1 where textid=(table2.id). > > Any tips?

Egor Egorov <[EMAIL PROTECTED]> wrote:
>Something like:

>SELECT ... FROM one, two WHERE textid=two.id AND MATCH(text) AGAINST() ..



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



Reply via email to