FreeText Query is slow - includes TOP and Order By
Posted
by Eric P
on Stack Overflow
See other posts from Stack Overflow
or by Eric P
Published on 2010-04-30T17:05:30Z
Indexed on
2010/04/30
17:27 UTC
Read the original article
Hit count: 197
The Product table has 700K records in it. The query:
SELECT TOP 1 ID,
Name
FROM Product
WHERE contains(Name, '"White Dress"')
ORDER BY DateMadeNew desc
takes about 1 minute to run. There is an non-clustered index on DateMadeNew and FreeText index on Name.
If I remove TOP 1 or Order By - it takes less then 1 second to run.
Here is the link to execution plan. http://screencast.com/t/ZDczMzg5N
Looks like FullTextMatch has over 400K executions. Why is this happening? How can it be made faster?
© Stack Overflow or respective owner