query in condition item limit

  1. Is there any limit to the number of value in the IN condition?



    'id' => [4, 8, 15],


and this

['in', 'id', [1, 2, 3]]

  1. Is it ok to has thousands of value in any of those IN condition?
  1. Not from Yii side. It depends on which storage engine you’re using. For example, in MySQL it’s limited by max_allowed_packet which is 4MB by default.

  2. Again, it depends.