Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Index??
Message
 
À
16/05/2007 11:11:53
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Divers
Thread ID:
01226028
Message ID:
01226435
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>I have been reading some text which indicates that to index an XML column, there must be a clustered index on the Primary Key of the table, and that the index on the XML column must be a "Primary Index".
>
>I understand a primary key, and I understand that a primary key can be a clustered or not-clustered index. An index can also be defined on the primary DB file, but I have not heard of 'Primary Index' before, and I am unable to pull anything up in a search for the whole term in BOL. Is there such a thing?
>
>Your help is greatly appriciated.

From http://msdn2.microsoft.com/en-us/library/ms188783.aspx
[PRIMARY] XML

    Creates an XML index on the specified xml column. When PRIMARY is specified, a clustered
index is created with the clustered key formed from the clustering key of the user table and an
XML node identifier. Each table can have up to 249 XML indexes. Note the following when you
create an XML index:

        * A clustered index must exist on the primary key of the user table.
        * The clustering key of the user table is limited to 15 columns.
        * Each xml column in a table can have one primary XML index and multiple secondary XML
          indexes.
        * A primary XML index on an xml column must exist before a secondary XML index can be
          created on the column.
        * An XML index can only be created on a single xml column. You cannot create an XML index
          on a non-xml column, nor can you create a relational index on an xml column.
        * You cannot create an XML index, either primary or secondary, on an xml column in a
          view, on a table-valued variable with xml columns, or xml type variables.
        * You cannot create a primary XML index on a computed xml column.
        * The SET option settings must be the same as those required for indexed views and
          computed column indexes. Specifically, the option ARITHABORT must be set to ON when an
          XML index is created and when inserting, deleting, or updating values in the xml
          column. For more information, see SET Options That Affect Results.

    For more information, see Indexes on xml Data Type Columns.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform