Why are joins bad when considering scalability?

后端 未结 16 2959
猫巷女王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:17

    Joins are fast. Joins should be considered standard practice with a properly normalized database schema. Joins allow you to join disparate groups of data in a meaningful way. Don't fear the join.

    The caveat is that you must understand normalization, joining, and the proper use of indexes.

    Beware premature optimization, as the number one failing of all development projects is meeting the deadline. Once you've completed the project, and you understand the trade offs, you can break the rules if you can justify it.

    It's true that join performance degrades non-linearly as the size of the data set increases. Therefore, it doesn't scale as nicely as single table queries, but it still does scale.

    It's also true that a bird flies faster without any wings, but only straight down.

提交回复
热议问题