Answer the question
In order to leave comments, you need to log in
Is it worth it to put the user's settings into another table?
Site on Kohana 3.3, using ORM
There is something like this users table:
id, login, first_name, last_name, email, phone, vkontakte, facebook, twitter, etc .... *
where "*" is about 15 (more in plan) cells tinyint(1), for example:
- allow sending SMS to clients
-- send SMS to clients after event 1
--- in case 1
--- in case 2
--- in case 3
- send SMS to clients after event 2
--- in case 1
--- in case 2
- send SMS to clients after event 3
--- in case 1
And so on..
Each account can be both a supplier and a client (even at the same time). The funny thing is that all these settings are needed only for a certain group of users, i.e. to suppliers
It turns out that regardless of whether the user is a client or a supplier, Kohana ORM drags all the information from the users table in each request (including the one that is relevant only for the supplier)
Is it worth putting all these settings into another table and linking it to user account? or such requests (even if they are long) do not bring a heavy load on the database?
It’s just that there are already a bunch of ORM models, I wouldn’t want to do a few more for customization
Answer the question
In order to leave comments, you need to log in
So it almost does not affect anything, the columns are quickly selected. Unless, of course, you have millions of records there and you don’t read them all at once ... But then there will be more work to connect the user profile with his account, so this will definitely be slower than a simple select.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question