Low query performance with fetched whereIn

Draft Disclaimer: Please note that this article is currently in draft form and may undergo revisions before final publication. The content, including information, opinions, and recommendations, is subject to change and may not represent the final version. We appreciate your understanding and patience as we work to refine and improve the quality of this article. Your feedback is valuable in shaping the final release.

# How whereIn became a growing ballon

  • be wary of where in statements
  • can easily grow to tons of ids
  • less bad when where in is fed a sub query vs fetched query
  • part of common performance issues with syntactic sugar
    • extract to own post
    • array filter map reduce
    • chain of map can be reduce to a single foreach
    • chain of array map and filter can be reduce to just filter