Efficiency sing a custom thesaurus in MySQL to improve search accuracy
===

I have two tables, Thesaurus and Relationships.  Thesaurus has columns word1 and word2.  Relationships has word1, relationword and word2.  Lets say I want to find everything that an "elephant" "is"...  Is a query like this effecient, or is there a better way:

    SELECT
        R.word2
    FROM 
        Relationships R,
        Thesaurus T,
        Thesaurus T2 
    WHERE 
        T.word1="elephant" AND R.word1=T.word2
    AND
        T2.word1="is" AND R.relationword=T2.word2

Won't this take many minutes if there's thousands of entries in Relationships and Thesaurus and is there a way to avoid that?  Is there a better way to do something like this?

(Note: This is more out of interest than related to a project at this point, so I'm not too worried about reinventing the wheel or anything)