
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.
27 lines
683 B
Plaintext
27 lines
683 B
Plaintext
== Why is this an issue?
|
|
|
|
Using a scalar function or an arithmetic expression in a ``++WHERE++`` condition can prevent the database from using indexes on the relevant column(s), and could therefore lead to performance issues.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cobol]
|
|
----
|
|
SELECT * FROM MY_TABE WHERE C2 = C3 + :HostVar1 -- Noncompliant
|
|
|
|
SELECT * FROM MY_TABLE WHERE YEAR(BIRTHDATE) > 2000 -- Noncompliant
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Refactor this SQL request to eliminate [the arithmetic expression|"xxx" scalar function] in the "WHERE" clause
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|