简体   繁体   English

如何降低非聚集索引扫描成本

[英]How to reduce Nonclustered index scan cost

I have a query that is running on MS Access and the NonClustered scan in the execution plan has a cost of 100% in our SSMS. 我有一个在MS Access上运行的查询,执行计划中的非群集扫描在我们的SSMS中的成本为100%。 This query has the second highes processing time, which means this reduces our applications speed when this is executed. 该查询具有第二高的处理时间,这意味着执行此查询时会降低我们的应用程序速度。 I am wondering if anyone knows what i can do to reduce the cost% for this Nonclustered index? 我想知道是否有人知道我可以采取什么措施来降低此非聚集索引的成本百分比? Below is the query that is calling this table, the indexed for this table and the execution plan. 下面是调用该表的查询,该表的索引以及执行计划。

SELECT "ContactID" ,"ContactName"  FROM "dbo"."Contacts" 

Here the execution plan: 这里是执行计划:

在此处输入图片说明

Here are the indexes that are in the table that this slow query is referencing: 这是此慢查询所引用的表中的索引:

在此处输入图片说明

您的查询没有WHERE子句,因此无法避免扫描整个表,因为您要求返回每一行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM