Sql Server 2008 Performance issue combinning CONTAINSTABLE and OR -
table_x contains 7000 rows table_y contains 1 000 000 rows
this request running fast on sql server2005 take 3 minutes on sql server 2008
select [extent1].[id] [id] [dbo].[tablex] [extent1] inner join [dbo].[tabley] [extent2] on [extent1].[id] = [extent2].[fk_id] ( ( [extent2].[fk_id] in ( ( select [key] containstable([tablex], (description), n'"pmi_log"') [ct] ) ) ) or ( [extent2].[id] in ( ( select [key] containstable([tabley], (description), n'"pmi_log"') [ct] ) ) ) )
already rebuild index, statistics , catalog.
the 2 subqueries (select..from containstable...) take 15ms
the execution plan takes 100% of time in table valued function [fulltextmatch]
after lots of test, happens when put or between fulltext queries, performance falling down.
can ?
thx,
this questions same problem: sql server 2008 full-text search (fts) extremely slow when more 1 containstable in query
this a known issue sql 2008 / 2008 r2. fixed in 2008 sp1 cu9 , 2008 r2 cu4.
as workaround, can split query 2 , union
results.
select [extent1].[id] [id] [dbo].[tablex] [extent1] inner join [dbo].[tabley] [extent2] on [extent1].[id] = [extent2].[fk_id] [extent2].[fk_id] in ( select [key] containstable([tablex], (description), n'"pmi_log"') [ct] ) union select [extent1].[id] [id] [dbo].[tablex] [extent1] inner join [dbo].[tabley] [extent2] on [extent1].[id] = [extent2].[fk_id] [extent2].[fk_id] in ( select [key] containstable([tabley], (description), n'"pmi_log"') [ct] )
Comments
Post a Comment