enrique_aeo
asked on
why not use the index?
I have this query
I created an index
no difference analyzing statistics and execution plan, why?
I'm using a table of the AdventureWorks BD
use
AdventureWorks
--1 Obtener plan de ejecucion estimado
set statistics io on
SELECT TOP 10
p.ProductID,
p.[Name],
p.StandardCost,
p.[Weight],
ROW_NUMBER() OVER (ORDER BY p.Name DESC) AS RowNumber
FROM Production.Product p
WHERE p. StandardCost >150
set statistics io off
--(10 row(s) affected)
--Table 'Product'. Scan count 1, logical reads 15, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
create NONCLUSTERED index idx_Producto_StandardCost ON Production.Product (StandardCost)
I created an index
no difference analyzing statistics and execution plan, why?
I'm using a table of the AdventureWorks BD
use
AdventureWorks
--1 Obtener plan de ejecucion estimado
set statistics io on
SELECT TOP 10
p.ProductID,
p.[Name],
p.StandardCost,
p.[Weight],
ROW_NUMBER() OVER (ORDER BY p.Name DESC) AS RowNumber
FROM Production.Product p
WHERE p. StandardCost >150
set statistics io off
--(10 row(s) affected)
--Table 'Product'. Scan count 1, logical reads 15, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
create NONCLUSTERED index idx_Producto_StandardCost ON Production.Product (StandardCost)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>can you give me T-SQL code please
Explain what you wish to do.
Explain what you wish to do.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER