Why are joins bad when considering scalability?

后端 未结 16 2955
猫巷女王i
猫巷女王i 2020-12-12 11:32

Why are joins bad or \'slow\'. I know i heard this more then once. I found this quote

The problem is joins are relatively slow, especially over very

16条回答
  •  自闭症患者
    2020-12-12 12:27

    Properly designed tables containing with the proper indicies and correctly written queries not always slow. Where ever you heard that:

    Why are joins bad or 'slow'

    has no idea what they are talking about!!! Most joins will be very fast. If you have to join many many rows at one time you might take a hit as compared to a denormalized table, but that goes back to Properly designed tables, know when to denormalize and when not to. in a heavy reporting system, break out the data in denormalized tables for reports, or even create a data warehouse. In a transactional heavy system normalize the tables.

提交回复
热议问题