Which statement in oracle gives the best IN or OR performance
Example:
select * from table where y in (1,2,3)
or
select * from table where y = 1 or y = 2 or y = 3
You want the explanation plan to be sure, but I would expect the performance to be identical.
Both operators are equivalent, the optimizer will generate the same access path. Therefore, you should choose the one that is the most readable (I would say first).
OR, . , . , AND , .
:
select * from table where ( y = 1 or y = 2 or y = 3 ) AND x = 'value'
. IN OR.
, , , 100% , .
, 100%.
. , , . Sybase, , Oracle ( , "" ).
Source: https://habr.com/ru/post/1717152/More articles:Can I fill out a google form from google spreadsheet? - google-spreadsheethttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1717148/force-xml-elements-to-match-the-class-order-when-serializing&usg=ALkJrhjrt4xjTxfCmlNs4agTwy-Gl9N7kwHow to track google analytics events on asp.net server side? - eventsHow to save BitmapImage / WriteableBitmap using SaveFileDialog in Silverlight 3.0? - streamhow to avoid conflict when I want to delete all files from git repo and then add new files - gitWhy use Model-view-controller? - javaHow to center a string in elisp? - stringSimple SQL question about getting rows and related counts - sqlC # - Interface - Help with the power of the interface - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1717157/wpf-creating-simple-controls-to-be-used-on-a-canvas&usg=ALkJrhgrI79xX89XLN0G_7Uay1q1l4-AcgAll Articles