Quantcast
Channel: SCN: Message List - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 2110

Re: "For All Entries IN" causes short dump when reading from HANA external view

$
0
0

Hi,

you need to visualize what's going on with transaction ST05 (SQL Trace).

Clause FAE is translated by ABAP into a series of DB-selects.

E.g. I traced

 

SELECT FROM snwd_so_inv_item

FIELDS node_key

  INTO TABLE @DATA(lt_keys).

 

DATA lv_count_1 TYPE i.

 

SELECT COUNT(*) FROM snwd_so_inv_item INTO lv_count_1

  FOR ALL ENTRIES IN lt_keys

  WHERE node_key = lt_keys-node_key

  .

 

DATA lv_count_2 TYPE i.

SELECT COUNT(*) FROM snwd_so_inv_item INTO lv_count_2

  FOR ALL ENTRIES IN lt_keys

  WHERE node_key = lt_keys-node_key

  %_HINTS HDB '&max_in_blocking_factor 100&'.

  .

 

This results in numerous DB-selects (assuming more than 1000 entries in table snwd_so_inv_item)

Then DB-selects look like

SELECT

  "CLIENT" , "NODE_KEY"

FROM

  "SNWD_SO_INV_ITEM"

WHERE

  "CLIENT" = ? AND "NODE_KEY" IN ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?

  , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,

  ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?

  , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,

  ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?

  , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )  WITH RANGE_RESTRICTION('CURRENT')

 

where the number of '?' equals 100 in case the hint is used (when the hint is not used the number is larger and possibly breaks the database; in my case it is 1024)

 

see also profile parameter 'rsdb/max_in_blocking_factor'

(Max. split factor for FOR ALL ENTRIES queries (IN opt))

 

How many entries has your table 'ct_data_tra' and what is the field size of 'trans_num' ?


Viewing all articles
Browse latest Browse all 2110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>