0

I receive a question.

  1. select * form table whereIn(id, array(1,2,3,4))

  2. select * form table where(id=1) or where (id=2) or where (id=3)

which query is faster? and Why. Thanks for reading!

TinhTN
  • 1
  • 2
  • 1
    This syntax is not MySQL and doesn't look like any other sql I am familiar with. Please ask about actual working queries. – ysth Nov 10 '21 at 04:49
  • It is documented that MySQL can optimize the IN clause under certain situations so IN would be faster. But there is only one way to find out. – Salman A Nov 10 '21 at 08:21

0 Answers0