5
我如何更快地查询这2000万条记录视图?
对于搜索功能,我正在使用一个视图,该视图具有需要搜索的所有表中的记录。该视图有近2000万条记录。针对该视图的搜索花费了太多时间。 我应该在哪里寻求改善这种观点的表现? 该视图的大致定义如下。它包括十三张桌子和大约三十个字段。 CREATE VIEW [dbo].[v_AllForSearch] AS SELECT FT.firstField AS [firstField] , FT.fld_primary AS [fld_primary] , FT.fld_thirdField AS [thirdField] , FT.fld_fourthField AS [fourthField] , ISNULL(ST.[fld_firstSearchField],'') AS [firstSearchField] , ISNULL(TT.[fld_thirdSearch],'') AS thirdSearch , ISNULL(TT.[fld_fourthSearch],'')AS fourthSearch , ISNULL(TT.[fld_fifthSearch],'')AS fifthSearch , ISNULL(FRT.[fld_sixthSearch],'') As [sixthSearch] , ISNULL(FRT.[fld_seventhSearch],'') AS [seventhSearch] , ISNULL(FRT.[fld_eightSearch],'')AS [eightSearch] , ISNULL(FIT.[fld_nineSearch],'') …