Using IN or OR

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saifahmad
    New Member
    • Nov 2008
    • 1

    Using IN or OR

    in MySQL queries, which one is more performance optimized between IN and OR operators.
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    I don't think there is any performance difference.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Everything in MySQL is optimized for performance. I doubt it very very much that minor syntax differences like these would affect the performance.

      You could always simply try them both out and see for yourself.

      Comment

      • mwasif
        Recognized Expert Contributor
        • Jul 2006
        • 802

        #4
        You can use EXPLAIN to compare the performance of both the queries.

        Comment

        Working...