SQL Server full text query across multiple tables - why so slow?

后端 未结 2 1179
庸人自扰
庸人自扰 2021-01-02 15:26

I\'m trying to understand the performance of an SQL Server 2008 full-text query I am constructing.

The following query, using a full-text index, returns the correct

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 16:19

    How does the execution plan for this compare?

    SELECT
        O.ID, O.Name
    FROM
        dbo.EventOccurrence O
        WHERE O.EventID IN (
                SELECT
                    E.ID
                FROM
                     dbo.Event E
                WHERE
                    FREETEXT(E.Name, 'search')
                UNION
                SELECT
                    E.ID
                FROM
                     dbo.Event E
                    INNER JOIN dbo.Venue V ON E.VenueID = V.ID
                WHERE
                    FREETEXT(V.Name, 'search')
                    )
    

提交回复
热议问题