July 15, 2013 at 5:47 am
Hi Chris,
Index created,
CREATE NONCLUSTERED INDEX [IX_VIEW_IP21] ON [dbo].[RESULT]
(
[SAMPLE_NUMBER] ASC,
[STATUS] ASC,
[ANALYSIS] ASC
)
INCLUDE ( [UNITS],
[NAME],
[NUMERIC_ENTRY]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
But actucal exec.plan high seek 94% which created new index on that table...
could we remove that new index?
thanks
July 15, 2013 at 6:08 am
Change the order of the keys - this should give you seeks on [status];
CREATE NONCLUSTERED INDEX [IX_VIEW_IP21] ON [dbo].[RESULT]
(
[STATUS] ASC,
[SAMPLE_NUMBER] ASC,
[ANALYSIS] ASC
)
INCLUDE ( [UNITS],
[NAME],
[NUMERIC_ENTRY]) WITH (PAD_INDEX = OFF,
STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF,
ONLINE = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 15, 2013 at 6:37 am
ananda.murugesan (7/15/2013)
But actucal exec.plan high seek 94% which created new index on that table...
Why are you fixated on the cost % of the index seek in the plan?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply