Thank you for the detailed explanation. I was making a collection of history parts who could have up to three children and one parent and made it as a double connected reference tree graph (Each document has the text, the parent Id and a list of children Id). Then the aggregation starts at the leaf and go up using graplookup to get all parents recursively. I was wondering about the performance and other way of doing it that was faster. After watching your video I propose a third way that is a combination of 1 and 2: Third way of doing things: Store the children Id, the direct parent Id, and a list of all the grandparents Id. That way a single document will reference all it's parents not needing recursive graph lookup, but still each document is stored separately and if each reference is 12 bytes, will take a extreme case to reach max document and/or aggregation size. (My use case starts at the leaf and search up, idk if this helps starting at the root and searching down)
I think we need to do some benchmarks to get some insights into the performance of each approach, in my case I remember way 1 worked perfectly so I used it without doing any benchmarks. your way is valid, I think that's the beauty of NoSQL, we organize the data based on our needs and how we use it. nice
How to represent a graph in Postgresql
ruclips.net/video/3WXiCT6jurk/видео.html
Thank you for the detailed explanation. I was making a collection of history parts who could have up to three children and one parent and made it as a double connected reference tree graph (Each document has the text, the parent Id and a list of children Id).
Then the aggregation starts at the leaf and go up using graplookup to get all parents recursively. I was wondering about the performance and other way of doing it that was faster. After watching your video I propose a third way that is a combination of 1 and 2:
Third way of doing things: Store the children Id, the direct parent Id, and a list of all the grandparents Id. That way a single document will reference all it's parents not needing recursive graph lookup, but still each document is stored separately and if each reference is 12 bytes, will take a extreme case to reach max document and/or aggregation size. (My use case starts at the leaf and search up, idk if this helps starting at the root and searching down)
I think we need to do some benchmarks to get some insights into the performance of each approach, in my case I remember way 1 worked perfectly so I used it without doing any benchmarks.
your way is valid, I think that's the beauty of NoSQL, we organize the data based on our needs and how we use it.
nice
Is it functioning properly without utilizing $replaceRoot to set it as the new root?
Thanks for sharing! This was very well explained!
can i get nested json as output using graphLookpup ?
keep it up my man
your channel is amazing
Thanks
can i get nested json as output using graphLookpup ?
Thanks for the great content
can i get nested json as output using graphLookpup ?
I'm not sure if there is an easy way to do this
Great video.
can i get nested json as output using graphLookpup ?
good job man. some very good ideas here.