E
E
Error_403_Forbidden2012-07-12 13:59:10
Database
Error_403_Forbidden, 2012-07-12 13:59:10

Database design: which is faster - XML ​​or JOIN?

A question about designing a database (MS SQL) that is resistant to loads.
There is a table [Parameters] (int PId) with some parameters, the number and value type of which can be different (nvarchar, int, bigint,...).
How best to describe it?
1. Enter an xml-field in which to store the name, type and value of the parameter
2. Divide it into several tables:
[ParameterType] (int PTId, nvarchar TypeName);
[ParameterStringValue](int PVId, nvarcharValue);
[ParameterIntValue] (int PVId, int Value);
[ParameterBigIntValue] (int PVId, bigint Value);
...
and in the Parameters table add a link to the PTId parameter type, in the ParametersValue table - a link to the PId in the Parameters table.
Naturally, still create the necessary indexes.

That is, what is more profitable in terms of performance to use - XML ​​or JOINs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aspect, 2012-07-12
@aspect

You missed the site, you are here www.sql.ru/forum/actualthread.aspx?tid=639050 if the structure will vary greatly, it is better to consider NoSQL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question