Use Cluster index or do not use it.

  • Hello,

    Can anyone tell me a good reason to i don't use or use cluster indexes?:blush:

    Can you give me one example of it?

    Thanks a lot.

    Regards,;)

    Jorge Mendes

  • It is understood that a clustered index is preferred for fileds without repeating values. For eg : if date is supposed to repeate in a table it is not a good candidate for clustered index.

    Fields supposed to be appeared in the where clause of queries can be used for non-clustered index. SQL Server 2005 added a new features 'include option' in the non-clustered index option.

  • Is there such a reason?

    you may want to read http://qa.sqlservercentral.com/articles/Miscellaneous/worstpracticesnotusingprimarykeysandclusteredindex/488/

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Very generally speaking, the consensus is that having a ci is a 'good thing'.

    So, the 'starting assumption' is then - yes, you want them.

    Naturally, as with all 'rules' there are exceptions.

    Sometimes you don't want or need a clustered index.

    That is, however, more regarded as an exception.

    The summary then becomes; go with the 'probably a good choice', use clustered indexes, and revert if they prove to be a problem in some specific spot.

    /Kenneth

  • Hi,

    If you are not selecting a range or large result sets, do not require record set sorted or not grouping, then no real benefit of a clusterd index, but I suspect this is highly unlikely the case.

    Thanks,

    Phillip Cox

  • The balance between having a clustered index or not is complex, I published an anlysis of index size ( so having a clustered index is covered as part of the sizing )

    http://sqlblogcasts.com/blogs/grumpyolddba/archive/tags/Indexes/default.aspx

    The size matters posts shows a clustered index vs a heap structure for the same table - you may find it interesting.

    On the whole I'd say that for very small tables, typically under an extent, it may be ok but for larger tables you'd want a clustered index, if only to remove fragmentation.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Thanks a lot everybody.

    The site and people that comes in are all very nice. Once more thanks a lot.

    😉

    Regards,

    Jorge Mendes

Viewing 7 posts - 1 through 6 (of 6 total)

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