Unofficial Hacker News client - receive Push Notifications on replies.

Why MySQL OR is slower than IN (opens external site)

22 points by millspore 2 days ago | www.percona.com | 14 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (2)

  1. Now I'm really confused. Your orignal comment reads like reordering changes semantics, so the two id= checks cannot be fused since reordering would be required for that. But now it sounds like reordering keeps semantics and is "just" left on the table by a simple optimizer, which isn't really relevant because the original comment is about a hypothetical optimization anyway...
    Replies (1)
    1. It is only about optimization yes. But the way it works today, but it is not guaranteed that collapsing the ORs to INs is optimal when it reorders _other_ predicates.