Andrzej Wójcik (Tigase) opened 9 years ago
|
|
I reviewed current implementation and from what I see in newer version of MongoDB situation changes and now Mongo uses indexes even when regex match is used in query. In our case if we are looking for subnodes of This behaviour reduces usage of regex matching to actuals subnodes or subnodes of subnodes. And processing of subnodes of subnodes is required as MongoDB implementation do not create entries for nodes but only for nodes with keys in it. This is designed this way to remove a need for creation of separate documents for nodes structure and introduce additional operations to ensure that parent node exists when entry is set. This new behaviour is good for small nodes of trees and in my opinion it will behave well with exception for nodes with big amount of subnodes, like in %wojtek What do you think? If we decide to improve performance of %wojtek I would like to have second opinion on this We need to have this decided before I will work on #4693 as solution for this will depend on our decision:
+Note:+ Current layout is similar to layout in RDBMS and for RDBMS storage of values for keys may be better than with use of subnodes for every VHost. |
|
Given that:
I would say that we should stay with current implementation (i.e. first option). |
|
I agree. Closing issue. |
Type |
Task
|
Priority |
Normal
|
Assignee | |
RedmineID |
3996
|
In current implementation of UserRepository for MongoDB we use RegExp to find subnodes of particular node. This works OK, however is not optimal from performance point of view for MongoDB.
It would be better to change this by usage of new field in
tig_nodes
collection namedparent_node
which will contain name of parent node. Due to that MongoDB will be able to use index for queries usingparent_node
field and speed up execution of this query.