Document structure
-user
- firstName
- lastName
...
- session
- table1
- filters, searches, states etc
- table2
- filters, searches, states etc
...
Question : Should I keep the session data in the user document or in a separate document?
If a user logs in, we query the entire document:
query = 'find the user... return u
If a user logs out, we save the user, including its session state
If a userlist is shown, we query only the doc fields needed:
query = 'for u in users.... return
{firstName: u.firstName, lastName: u.lastName}
Thoughts: Although we query only the data we need, does the size of the document impact DB-performance in the background? Like does Arangodb fetch the entire document in the background, before returning only part of it? Or maybe any other server processes that are impacted by bigger doc sizes?