FreeText Query is slow - includes TOP and Order By

前端 未结 6 1420
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-13 15:03

The Product table has 700K records in it. The query:

SELECT TOP 1 ID, Name FROM Product WHERE contains(Name, \'\"White Dress\"\') ORDER BY DateMadeN

6条回答
  •  庸人自扰
    2021-01-13 15:39

    A couple of thoughts on this one:

    1) Have you updated the statistics on the Product table? It would be useful to see the estimates and actual number of rows on the operations there too.

    2) What version of SQL Server are you using? I had a similar issue with SQL Server 2008 that turned out to be nothing more than not having Service Pack 1 installed. Install SP1 and a FreeText query that was taking a couple of minutes (due to a huge number of actual executions against actual) went down to taking a second.

提交回复
热议问题