Options

can't understand what CLUSTERED property means

leugimleugim Member Posts: 93
edited 2008-04-07 in SQL Performance
hi

what means exactly the CLUSTERED property in a nav key?

regards
_______________
so far, so good

Comments

  • Options
    David_SingletonDavid_Singleton Member Posts: 5,479
    Sure you should search Google to find out in general what a clustered index is, but your question is about the clustered index box in NAV.

    In layman's terms "Clustered" means that all the data in the record is stored with this key. In Native datbase the Primary key can be compared to a Clustered index, because it stores all the data in the record. If you look at The Sales Line for example, the key Doc type, Doc No, Line No, includes with it Item no, description qty etc. so if you sort by Type,No and then find a record for a particular item, the server then has to go to the clustered index (doc typ, doc no, line no) to get other fields like say Description.

    Unfortunately because Navision ALLWAYS does a SELECT *, it has to get every field even if you don't need them, so it ALLWAYS has to at some stage get the Clustered Index as well as the key it uses to execute the retrieval. (read more here : SELECT * in NAV on SQL

    Optimizing the CLustered index, looks easy, but if you do it wrong you can cause a lot of problems. But of course no problems with playing with it in a test environment. So to answer your question, the tick box tells SQL which NAV key (or keys) need to contain all the data in the record.
    David Singleton
  • Options
    leugimleugim Member Posts: 93
    wow! thanks david, this is what i call a good reply :!: :!:

    thanks a lot, now i can explain what a clustered key is to my colegues

    rgrds
    _______________
    so far, so good
  • Options
    David_SingletonDavid_Singleton Member Posts: 5,479
    leugim wrote:
    wow! thanks david, this is what i call a good reply :!: :!:

    thanks a lot, now i can explain what a clustered key is to my colegues

    rgrds

    You are very welcome :mrgreen:
    David Singleton
Sign In or Register to comment.