Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question