:
, . . .
.
. , , .
, , .
, , , . SQL Server .
, .
CREATE NONCLUSTERED INDEX IX_1 ON Table1 (Column1)
INCLUDE (PK_Column, SomeOtherColumn)
, , .
select pk_column, someothercolumn
from table
where column1 = 'somevalue'
SQL Server , , .
, ,
create index nci_test on table(column1)
,
select pk_column, someothercolumn
from table
where column1 = 'somevalue'
:
.
[orderid] [int] NOT NULL Primary key,
[custid] [char](11) NOT NULL,
[empid] [int] NOT NULL,
[shipperid] [varchar](5) NOT NULL,
[orderdate] [date] NOT NULL,
[filler] [char](160) NOT NULL
.
create index onlyempid on orderstest(empid)
,
select empid,orderid,orderdate
from orderstest
where empid=5
.
CREATE NONCLUSTERED INDEX empidalongwithorderiddate
ON [dbo].[orderstest] ([empid])
INCLUDE ([orderid],[orderdate])
, orderid
.
--- -------
onlyempid..

empidalongwithorderiddate

---- -------
onlyempid..

empidalongwithorderiddate

, , .
I , ,