Low query performance with fetched whereIn

# 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