Is too many Left Joins a code smell?

前端 未结 8 1797
南笙
南笙 2021-01-01 09:30

If you have for example > 5 left joins in a query is that a code smell that there is ...

  • something wrong with your design?
  • you\'re doing too much in o
8条回答
  •  孤独总比滥情好
    2021-01-01 09:39

    It is pretty much impossible for someone to answer a question as general as this and to attempt to create such an arbitrary rule would pointless.

    Left joins are a perfectly acceptable type of join which map onto a very common need: get me all x's, if they have associated y's then get those too.

提交回复
热议问题