NC Index Seek 51% and select cost 0%?

  • 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

  • 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

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    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

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply