How do we know where to use which index ?

  • Hello all,

    I have question regarding Indexes.

    I have created couple new tables, how can i make decision where should i create clustered index and non clustered index.

    I created clustered index on primary key. Could anyone suggest me .

    coz i'm thinking primay key alwas have clustered index.

    Other thing should i define fill factor while creating indexes and how much for OLTP application.

     

    Thanks in advance

     

    Andy 

  • The columns in the where clause are good candidates. U can use Index Wizard to build indexes based on sql scripts.

  • foreign Key fields are also a good bet for an non-cluc indexes as well!

  • On the fill factor side of your question, the default of 90 is a safe bet unless:

    a) you have data the is never updated or added to - you can increase the fill factor

    b) you are desperate for disk space - you can lower it - I would strongly recommend avoid being desperate for disk space for too long

    c) you add data at a rapid rate to this table or it goes through many changes on the indexed fields - you can lower the fill factor

    Good Luck!

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

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