A
A
Alexey Lebedev2015-07-10 16:43:18
SQL
Alexey Lebedev, 2015-07-10 16:43:18

Many columns or many tables?

There is a table:
Users (users):
id,
login,
password,
role,
name,
info,
icq,
phone,
time_join,
last_activity,
post_count,
comments_count,
good_comments_count,
good_posts_count
..
And many more
Or we break it down into:
users, contacts, stats .
Does it make sense to break?
As far as I know the number of columns does not affect the speed. And here's the extra. JOIN will have an effect.
Beauty, normalization and so on do not excite me. Only in terms of speed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-07-10
@2fox

"Many columns" works faster + database size is smaller

R
Roman Mirilaczvili, 2015-07-10
@2ord

I think this is the best option:

Or we break it down into:
users, contacts, stats.

Is there really no password_salt field ? Is the password field exactly a hash (SHA-256, SHA-512)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question