List in DataBase or Search - waht is more effective?


I’m creating some kind of posts and comments system.

I’m wondering what is more effective when it comes to optimalization:
a) containing list of comments in “POST” DB type?
b) creating “POST ID” data type in “COMMENTS” DB and whenever user opens some post workflow is like “do a search for COMMENTS POST ID - THIS POST UNIQUE ID”

What do you think about that?

Let’s say that there could be thousands of comments to one post.


Option “B” is more efficient since searches run on bubble servers rather than your computer. However, you don’t need to create a POST ID, you can just link a post to the comment like this:

Field name: linked post
Type: POST

1 Like