我想在 SQL Server 2008 R2 的 Column1 和 Column2 中创建索引 以下查询有什么区别:
不包括
CREATE NONCLUSTERED INDEX [IX_1] ON [dbo].[MyTable] ( [Column1] ASC, [Column2] ASC ) ON [PRIMARY]
或包括:
CREATE NONCLUSTERED INDEX [IX_2] ON [dbo].[MyTable] ( [Column1] ASC ) INCLUDE ([Column2]) ON [PRIMARY]