A
A
Alexander2017-01-08 14:35:53
Database
Alexander, 2017-01-08 14:35:53

Should the users table be split into several?

Is it necessary to split the users table into several for optimization purposes? At the moment, I already have about 20 columns in this table, and most likely this number will increase by 2-3 more times.
c714d1618c5a4dc5a460542ae349c1e1.jpg

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rsa97, 2017-01-08
@LordGuard

And what's the difference, how many columns are there, if they are really needed? Ask only what you need and that's it.

K
ky0, 2017-01-08
@ky0

It depends on what queries you are going to execute on this data and how much they will weigh. In general, one table is better, because UNION is quite a resource intensive operation.

D
d-stream, 2017-01-08
@d-stream

A little more users than the fingers? -)
It makes sense to deal with the structure if tel1, tel2, tel3, etc. appear there. More precisely, not to fight, but to normalize.
In general, it would be interesting to see the current list of fields in the studio + assumptions about future ones - it would be possible to suggest more productively.

Z
Zakhar Storozhuk, 2017-01-08
@Phell

If a large number of columns bothers you and in the future you are not going to enter editing directly from the database, but through interfaces (control panels of your product), then you can group the columns. For example:
gameCount, winGameCount stored in one column, in this form of values:
"[10, 2]", and name the column itself as gameInformation. Accordingly, you can group 10 columns if they describe the same element in your product.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question