Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Query for BSIS BKPF and FAGLFLEXA takes too much time

$
0
0

Hello,
I have 3 querys and all 3 of them take between 7 to 10 min, can I reduce this time? help pls.

 

SELECT bukrs belnr gjahr blart budat xblnr bktxt awtyp

   INTO TABLE i_bkpf

   FROM bkpf

   WHERE bukrs     = p_bukrs

     AND gjahr     EQ p_fe_cla(4)

     AND budat     IN p_fe_con

     AND bstat     IN s_bstat

     AND awtyp     IN ('BKPF', 'VBRK')

     AND xreversal EQ space.


SELECT sgtxt belnr buzei dmbtr dmbe2 shkzg gjahr hkont bukrs budat augdt

       INTO TABLE i_bseg

       FROM bsis

       WHERE bukrs p_bukrs

         AND hkont IN gr_hkont

         AND gjahr EQ p_fe_cla(4)

         AND budat IN p_fe_con

         AND bstat IN s_bstat

         AND prctr IN s_prctr

         %_HINTS ORACLE 'INDEX("BSIS" "BSIS~Z01")'.


SELECT rbukrs docnr ryear segment prctr

     INTO CORRESPONDING FIELDS OF TABLE t_faglflexa

     FROM faglflexa

     FOR ALL ENTRIES IN i_detalle_aux

     WHERE rbukrs  = i_detalle_aux-bukrs

     AND  docnr   = i_detalle_aux-belnr

     AND  ryear  = i_detalle_aux-gjahr

     %_HINTS ORACLE 'INDEX("FAGLFLEXA" "FAGLFLEXA~Z01")'.



Ty all.


Viewing all articles
Browse latest Browse all 3523

Trending Articles