Back

Database experts, should I use a separate query or a subquery? 🤔

For example, I want to retrieve the author's name for all the posts. Should I add a subquery to fetch that name, or use a separate query to get the names and then map them with the posts? 🧐

6

275

In response to @MrPunyapal

For small database we can use joins.

For large data you want to Denormalise and make separate queries, you can partition , you can even keep data in separate databases, maybe you can keep 1 part of the data in cache which relatively changes less.

63

  • No matching results...
  • Searching...

/ 1000