Join two buckets (regarding user information). Should I do it?


I am considering to have a separate bucket for my conversation system, that is totally settled apart of the rest of the application and it should have a different amount of RAM attached to it.

The unique thing that links my conversation bucket to my application bucket is the user_accounts.

I’ve thought about keeping an ID of the users who created messages in the conversation bucket, and when I do need to reference the updated information I would just grab the messages and join the user information from the other bucket.

Is this a good approach or would it be somewhat heavy?


You can do JOINs if one document contains the key of the other document. JOINs across buckets have the same cost as JOINs within the same bucket. So you have the freedom to choose. There are other considerations, of course, for example if you are using key-value access as well in your application.

Hey @geraldss,

That seems good to me :slight_smile:


1 Like