Questions about DB design.

Asked 2 years ago, Updated 2 years ago, 42 views

For example, when obtaining the number of posts per user,

In my opinion, the things that can be a determinant are

Is it different depending on the situation? How do you usually design it in practice?

database

2022-09-21 20:20

1 Answers

In practice, the post table is counted.

Count is not a function that requires a lot of resources, but if there is a lot of row enough to affect the search speed, it can be solved with hints or indexes.

If the number of posts is frequently viewed, you can use the cache.


2022-09-21 20:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.