Optimizing a query returning a lot of records, a way to avoid hundreds of join. Is it a smart solution?

后端 未结 3 1341
攒了一身酷
攒了一身酷 2021-01-29 04:08

I am not so int SQL and I have the following doubt about how to optimize a query. I am using MySql

I have this DB schema:

And this is t

3条回答
  •  礼貌的吻别
    2021-01-29 05:07

    One of the approach is to make a separate Read Model Table it comes from CQRS approach with containing all necessary attributes just for select and no any joins but you will need to update the Read Model table each time some other tables changes one more options is to create a View

提交回复
热议问题