
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
44 lines
918 B
Plaintext
44 lines
918 B
Plaintext
== Why is this an issue?
|
|
|
|
Removing duplicate entries from driver tables enables ``++OPEN SQL++`` to generate fewer queries for getting the same data, giving a performance boost.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,abap]
|
|
----
|
|
SELECT carrid , connid , seatsocc FROM flights
|
|
INTO TABLE seatsocc_tab
|
|
FOR ALL ENTRIES IN conn_tab
|
|
WHERE carrid = conn_tab-carrid
|
|
AND connid = conn_tab-connid.
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,abap]
|
|
----
|
|
SORT conn_tab BY carrid.
|
|
DELETE ADJACENT DUPLICATES FROM conn_tab COMPARING carrid.
|
|
...
|
|
SELECT carrid , connid , seatsocc FROM flights
|
|
INTO TABLE seatsocc_tab
|
|
FOR ALL ENTRIES IN conn_tab
|
|
WHERE carrid = conn_tab-carrid
|
|
AND connid = conn_tab-connid.
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Potential duplications in "xxxx" should be deleted before this "SELECT".
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|