rspec/rules/S1512/abap/rule.adoc

24 lines
745 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
ABAP hints can be used to override the default behavior of the SAP Cost Based Optimizer (CBO). When the execution plan provided by the CBO is not optimal, it is possible to "drive" the CBO by providing the main index to be used to filter rows.
Such optimizations are not portable from one database to another, such as when migrating from Oracle to DB2. Therefore hard coding an optimization should be done only when it is strongly indicated.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
select MY_COLUMN
into it_data
from MY_TABLE
WHERE FILTERING_COLUMN = '0'
%_HINTS ORACLE 'INDEX("MY_TABLE" "MY_INDEX")'.
----
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::rspecator-view[]