Index consideration.

  • I have a table having 84000+ records, I am planning to consider index on this table. I am putting few details of execution plan below: -

    When table has no Index: -

    Select * from <table name>;

    Table scan happens,

    Estimated I/O cost = 0.517278

    Estimated CPU cost = 0.0930076

    Estimated operator cost = 0.610285(100%)

    Estimated sub-tree cost = 0.610285

    When table has clustered Index on id column: -

    Clustered Index scan happens,

    Estimated I/O cost = 0.517199

    Estimated CPU cost = 0.0930861

    Estimated operator cost = 0.610285(100%)

    Estimated sub-tree cost = 0.610285

    When table has Non-clustered Index on id column: -

    Table scan happens,

    Estimated I/O cost = 0.517199

    Estimated CPU cost = 0.0930861

    Estimated operator cost = 0.610285(100%)

    Estimated sub-tree cost = 0.610285

    Now my question is without indexing estimated CPU cost 0.0930076 is very less compare to others 0.0930861 and estimated I/O cost 0.517278 is higher than others 0.517199. Then which Index I need to create ? I am bit confused about this, please help.

  • Duplicate post.

    Discussion already started here



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • the index that should you use

    as you needs if you care about time you should use the speed of time of them

    if you care more about the space you can use the most ones takes space

Viewing 3 posts - 1 through 2 (of 2 total)

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