Neither of them really matter in the big scope of things. The network latency in communicating with the database will far outweigh either the count($object_ids)
overhead or the =
vs IN
overhead. I would call this a case of premature optimization.
You should profile and load-test your application to learn where the real bottlenecks are.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…