开发者

query execution plan : missing index

开发者 https://www.devze.com 2022-12-22 03:08 出处:网络
开发者_开发知识库alt text http://img502.imageshack.us/img502/7245/75088152.jpg There are two tables that I join them together, one of them is a temp table and I create an index after creating the tab
开发者_开发知识库

alt text http://img502.imageshack.us/img502/7245/75088152.jpg

There are two tables that I join them together, one of them is a temp table and I create an index after creating the table. But it is said in the query execution plan above.

what should I consider to convert all scan operations to seek operations? There are parts which are joins and where conditions...

Regards bk


The "Missing index" hint that is displayed is your best starting point. SQL Server has detected you would get better performance by adding the index that it tells you to.

It's difficult to be specific as really need to know what your SELECT statement is as a number of things could cause a scan to be done instead of seek.

As an example, I recently blogged about how the structure of your WHERE clause for (e.g.) date filtered queries, can turn seeks into scans - in this instance things to look out for are the use of functions within the WHERE clause.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号