Oracle <> , != , ^= operators

后端 未结 4 1362
孤街浪徒
孤街浪徒 2020-12-03 08:24

I want to know the difference of those operators, mainly their performance difference.

I have had a look at Difference between <> and != in SQL, it has no perf

4条回答
  •  被撕碎了的回忆
    2020-12-03 09:13

    A Programmer will use !=

    A DBA will use <>

    If there is a different execution plan it may be that there are differences in the query cache or statistics for each notation. But I don't really think it is so.

    Edit:

    What I mean above. In complex databases there can be some strange side effects. I don't know oracle good enough, but I think there is an Query Compilation Cache like in SQL Server 2008 R2. If a query is compiled as new query, the database optimiser calculates a new execution plan depending on the current statistics. If the statistics has changed it will result in a other, may be a worse plan.

提交回复
热议问题