我可以做些什么来提高查询性能吗?我已经包含了执行计划和服务器分析器输出。有索引可以帮忙吗?我发现索引查找需要一些时间,我可以做些什么来帮助解决这个问题吗?在服务器配置文件中,我看到读取次数看起来很高,有什么办法可以帮助解决这个问题吗?
SELECT dbo.Templates.VersionKey
FROM dbo.Templates INNER JOIN
dbo.Indications ON dbo.Templates.Id = dbo.Indications.TemplateId INNER JOIN
dbo.Sentences ON dbo.Indications.SentenceId = dbo.Sentences.Id INNER JOIN
dbo.SentenceParts ON dbo.Sentences.Id = dbo.SentenceParts.SentenceId INNER JOIN
dbo.SentencePartValues ON dbo.SentenceParts.Id = dbo.SentencePartValues.SentencePartId
WHERE (dbo.Templates.Status <> 8) AND
(dbo.Templates.IsCurrentVersion = 1) AND
(dbo.Indications.IsActive = 1) AND
(dbo.Indications.IsCurrentVersion = 1)
AND (NOT (Sentences.[IsDeleted] = 1))
AND (NOT (SentenceParts.[IsDeleted] = 1))
AND (NOT (SentencePartValues.[IsDeleted] = 1))
and
(SUBSTRING(dbo.SentencePartValues.LiteralValue, 12, 36) = 'a2278339-8add-ff3d-8baa-9654b8b8d00b')