Answer the question
In order to leave comments, you need to log in
Can nested sets be used for large tables?
There is a task to construct a tree of users.
By the principle of the pyramid, I invited 3, those 3 for another 3, then those 9 for another 3, and so on.
The task is to receive a specific line of a specific user.
For example:
User 1
- User 2 (Line 1)
- User 5 (Line 2)
- User 6 (Line 2)
- User 7 (Line 2)
- User 3 (Line 1)
- User 8 (Line 2)
- User 9 ( 2nd line)
- user 10 (2nd line)
- user 4 (1st line)
- user 11 (2nd line)
- user 12 (line 2)
- user 13 (line 2)
For example, I want to get line 2 of User 1, these will be:
user 5,6,7,8,910,11,12,13
So the main question is, is it possible to work with nested sets with tables over 1,000,000 entries? Ie, will there be any problems with the speed of obtaining data, etc.?
Answer the question
In order to leave comments, you need to log in
the sample is clear, but the record.
I think to do so when the user registers immediately do not change the key, but it will take a long time. Leave this matter behind the crown. For example, once an hour to check what we have like there, who has registered, whose structure to update. Is it optimal?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question