DB design and optimization considerations for a social application

前端 未结 5 1319
花落未央
花落未央 2021-02-06 14:43

The usual case. I have a simple app that will allow people to upload photos and follow other people. As a result, every user will have something like a \"wall\" or an \"activity

5条回答
  •  [愿得一人]
    2021-02-06 15:19

    I would probably start with using a normalized schema so that you can write quickly and compactly. Then use non transactional (no locking) reads to pull the information back out making sure to use a cursor so that you can process the results as they're coming back as opposed to waiting for the entire result set. Since it doesn't sound like the information has any particular critical implications you don't really need to worry about a lock of the concerns that would normally push you away from transactional reads.

提交回复
热议问题