September 14, 2015 at 8:39 pm
Hi everyone,
I have a table mentioned below-
CREATE TABLE Jcdtl
(
mdoc_no int NOT NULL
CONSTRAINT PK_jcdtl_mdocno PRIMARY KEY CLUSTERED,
CONSTRAINT CK_jcdtl_mdocno CHECK(mdoc_no>0),
somdoc_no int NOT NULL
CONSTRAINT FK_jcdtl_somdocno REFERENCES Sodtl(mdoc_no),
pd_id int NOT NULL
CONSTRAINT FK_product_pdid REFERENCES Product(pd_id),
)
GO
Now i make an index (NC) for somdoc_no column and make another index (NC) for pd_id column.
My question is that should i have to make another composite index (somdoc_no,pd_id) for these columns or above indexes are sufficient for searching.
when i searching data by single column or both column in where clause.
Kindly Suggest
Regards
Gaurav
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply