Date time index sql server 2005 -
i know mutual topic stil sense scenario requires custom advice. selecting table other day , took me age select on datetime column has not been indexed. want index this, problem ebing "production" 2005 box unfamiliar , how handle index creation. in mind wondering safest way me create index on table is. details think people need below (i hope) :
index created on field 5 (possibly field4 also)
table 1 definition:
create table [dbo].[table 1]( [id] [uniqueidentifier] not null constraint [df_bla] default (newid()), [field1] [nvarchar](7) null, [field2] [nvarchar](10) null, [field3] [nvarchar](2) null, [field4] [datetime] null, [field5] [datetime] null, [field6] [smallint] null, [field7] [nvarchar](1) null, [field8] [nvarchar](7) null, [field9] [nvarchar](60) null, [field10] [smallint] null, [field11] [nvarchar](15) null, [field12] [datetime] null, constraint [pk_id] primary key clustered ( [id] asc )with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary] ) on [primary] total count of rows in table 1 : 2926836
sql sql-server-2005 indexing
No comments:
Post a Comment