In my business there is One table with this structure :
CREATE TABLE Tbl(
[Month] [INT] NOT NULL,
[Region] [CHAR](1) NOT NULL,
[ID] [BIGINT] NULL,
[LastName] [NVARCHAR](100) NOT NULL,
[FirstName] [NVARCHAR](50) NULL,
[Address] [NVARCHAR](100) NOT NULL,
[Path] [CHAR](8) NOT NULL,
[LastUpdate] [NUMERIC](6, 0) NOT NULL,
[PostCode] [CHAR](10) NULL,
[NationalCode] [CHAR](10) NULL,
[Tel] [VARCHAR](12) NULL,
[cl1] [SMALLINT] NULL,
[cl2] [NUMERIC](12, 0) NULL,
[Date] [NUMERIC](6, 0) NULL,
[Time] [CHAR](6) NULL,
[City] SMALLINT NOT NULL)
all Queries will written such as following:
select LastName,FirstName,Address,... from tbl where City = Value1 and region = Value4 and Month = vlaue3 and Path between value8 and value9
the combination of id and Month will are Unique for create primary key.
how can i choose clustered index on table?
how can i create nonclustered index on table for above query?
Mar 10 at 10:56 AM