Optimize fulltext query

Hello!

For some research purposes i perform fulltext search with SENTENCE operator. Something like this:

SELECT id FROM index_idx WHERE match(’@* WORD1 SENTENCE WORD2 … WORDN’)

This query type is very slow and i am looking for methods to optimize execution time. My suggestion was to make first query with operator AND between WORD1…WORDN, it performs very fast and then with small number of ids add a new condition to the first query:

and id IN (…)

But it seems doesn’t works. It looks like match function always performs first. Is it any way make it work fast?

Thanks in advance!

1 Like

Fulltext is always executed first. Can you elaborate more on the issue? Can you provide a particular SELECT and SHOW META?