Hi I have a need to store hundreds if not thousands of elements in the database as XML. I will not index anything in the XML field. I will simply select certain elements within the xml. I would like to know if there is any performance penalty for simply selecting fields in the XML. Here is example XML that will be stored in the database.
<fields>
<field name="FirstName" type="text" value="Gary" sort="2" />
<field name="LastName" type="text" value="Smith" sort="3" />
<field name="City" type="text" value="Los Angeles" sort="4" />
<field name="Age" type="number" value="12" sort="6" />
<field name="Address" type="text" sort="2">
<streetnumber value="1234" />
<streetname value="sail" />
</field>
</fields>
I will probably have more than 3000 field tags in one record. I simply want to get 10 fields in a single query. I will have a primary key on the table and will be selecting records based on the primary key but will be getting fields from the XML column. I am afraid the more field elements I put in the XML will compromise performance. Will there be a performance penalty for simply selecting 10 or more fields from the XML column? Also, I will not be using the xml column in a where clause I will use the primary in the where clause then I will select fields from the XML column. Will there be a performance penalty?