2007 Oct 05 7:27 AM
hi,
am getting very very bad performance with the below select..plz suggest better one
SELECT SINGLE KUNNR FROM BSAD INTO FKUNNR
WHERE BUKRS = FBUKRS
AND KUNNR NE SPACE
AND GJAHR = FGJAHR
AND BELNR = FBELNR
AND BUDAT IN BUDAT.
Hi,
There is not much you can do with this query.
But can't you use another table as BSAD has very huge amount of data.
Regards,
Atish
2007 Oct 05 7:31 AM
Hi,
There is not much you can do with this query.
But can't you use another table as BSAD has very huge amount of data.
Regards,
Atish
2007 Oct 05 10:48 AM
Hi
Instead of using BSAD table you can use another table BSEG since you
know the field BUKRS, BELNR and GJAHR.
SELECT SINGLE KUNNR FROM BSEG INTO FKUNNR
WHERE BUKRS = FBUKRS
AND BELNR = FBELNR
AND GJAHR = FGJAHR
AND KOART EQ 'D'. "D IS CUSTOMER ENTRY
Regards
Harish
2007 Oct 05 10:54 AM
Hello Tuborg,
It is also important to know which all values do u know among the 4 passed to select because if FBUKRS,FGJAHR & FBELNR is know then u can directly access BSEG and get the value. However they are not know then u will have to access the BSAD table.
2007 Oct 10 11:20 AM
Hi Tuborg,
If you have all the key fields before the selection, then add those key fields also, which can improve performance.
Thanks and regards
Antony thomas
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |