rsdb/prefer_union_all

Parameter

rsdb/prefer_union_all

Short text

set if UNION ALL shall be used for FOR ALL ENTRIES

Parameter Description

This parameter is only intended for internal use and must not be changed without explicit instruction from SAP.

An internal table [itab] with entry data is always returned to an ABAP SELECT query with the addition FOR ALL ENTRIES. Depending on whether this parameter is set to “0” or “1”, a link to whole statements with UNION or an OR connection of condition is generated in the WHERE clause. Each of the linked part-statements/part-conditions represent an entrey of the input table [itab].

Example

The open SQL statement

SELECT … FOR ALL ENTRIES IN itab WHERE f = itab-f.
is displayed depending on the parameter rsdb/prefer_union_all as follows on standard-compliant SQL:

rsdb/prefer_union_all = 0 (and rsdb/prefer_in_itab = 0)

SELECT … WHERE f = itab[1]-f

OR f = itab[2]-f

OR f = itab[N]-f

rsdb/prefer_union_all = 1

SELECT … WHERE f = itab[1]-f

UNION ALL SELECT … WHERE f = itab[2]-f

UNION ALL SELECT … WHERE f = itab[N]-f
Here N refers to the number of lines in itab and itab[i]-f the value of the field f in the i table row.

Application Area

Database

Parameter Unit

1 / 0

Default Value

The default value is database-dependent. A common, artifical value (-1) must be specified for technical reasons. The original default values are specified below for each database system. Caution: As these values are changed by kernel patches, take the current default values from SAP Note 48230.

DB2/390
1

DB2 UDB
1

Informix
1

iSeries
0

MaxDB
1

MS SQL Server
1

Oracle
0

Are other parameters affected or dependent?

rsdb/prefer_in_itab_opt

You May Also Like

Leave a Reply?