akosiaris added a comment.

  In T301471#7964353 <https://phabricator.wikimedia.org/T301471#7964353>, 
@Michaelcochez wrote:
  
  > Regarding the option of using  a batch of queries to an external database; 
the issue is that what we are creating is a specialized index specifically for 
what we need. What we perform is a tree traversal were at each node a new 
decision is made.  To do something like this with a database, one would have to 
fire a series of queries where each of the queries is dependent on all the 
results of the previous ones.
  
  Yes, the point is that, depending on a couple of things, like what type of 
tree you are using (binary search tree, AVL  tree, B-tree, red-black tree etc) 
and the amount of nodes in the tree, and given that these things tend to have a 
complexity of `O(log n)`, it quite possibly could be fine to bulk fetch the 
entirety of a branch, from the starting point of the branch  down to the leaf 
nodes in 1 query. Depending on the value of `n` that might mean that after 
issuing something like 2-5 requests, the tree would have been trimmed down 
enough to fetch the entirety of it in a single query and just finish up the 
work left locally. This can be especially useful e.g. for recommendations, 
where one probably wants multiple leaf nodes and not just 1.

TASK DETAIL
  https://phabricator.wikimedia.org/T301471

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: akosiaris
Cc: akosiaris, QChris, ItamarWMDE, Joe, Aklapper, Addshore, karapayneWMDE, 
Martaannaj, Michaelcochez, Astuthiodit_1, Arnoldokoth, Invadibot, maantietaja, 
wkandek, JMeybohm, Akuckartz, Nandana, jijiki, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Eevans, Hardikj, 
Wikidata-bugs, aude, Sjoerddebruin, Jdforrester-WMF, Mbch331, Jay8g, Dzahn
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to