是否应该将许多表编入索引?什么样的指数才是最好的?CREATE TABLE user_role ( roleId INT
--edit: drachenstern - I added the table def based on the original comments, and assumed ints.
在Northwind数据库中,我从表类别中选择:如您所见,表在列CategoryName上有一个非聚集索引。这个SQL查询:返回具有索引查找的执行计划:
select CategoryName ,Description from Categories where Categories.CategoryName like '
我有一个问题:我在orderid,productid上有一个聚集索引,在productid上有一个非聚集索引。当我使用下面的查询时,它使用productid上的非聚集索引seek,这是我所期望的:from Sales.OrderDetailsorder by productid
但是,在不更改搜索参数的情况下,我添加了Qua