Sometimes, you need to access a certain document
(A), but you do not know the key for that document (A), as that data is stored in a different document
(B). So now, if you want to fetch
A, it looks like the following:
fetch B parse B get name of A fetch A
Now, obviously, this doesn't look too bad, but after three or four levels of recursion, especially once you have larger documents (100 KB+), this can become a performance issue:
fetch A (10K) parse A fetch B (100K) parse B still parsing B fetch C (1M) waiting for C parse C still parsing C and still parsing C fetch D (1K)
How can I reduce the amout of recursion required in a scenario like this? I mean, obviously, I could rewrite the documents, but if that is not an option, what exactly can I do?
My documents are all JSON documents; does Couchbase have some sort of feature to fetch documents recursively for me?