on 03-26-2014 1:25 PM
Hi All,
In a stored procedure, I have a simple logic,fetch data from a table and update HANA DB table.
When I call the SP it took 5 mins to complete.
Then, I have added load type as input parameter.
If load type = F
Above logic, fetch data from a table and update HANA DB table.
elseif load type D
fetch data from a table and update HANA DB table with some where clause.
endif.
When I call SP with load typ F, now it is running for more than 2 hrs.
Same logic w/o IF CLAUSES completed in 5 mins, and if I put IF clause it took > 2hrs.
Please help me how to resolve this issue?
Thanks
Hi Ramya,
Can you paste your code so it will be helpful for others to suggest.
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot provide actual code. Given pseudo code.
Driving table to update HANA DB table is SAP BW table.
Count of attribute view (AV_SOURCE) = 7,778,211.
Created an attribute view(AV_SOURCE) with inner join b/w two SAP_BW_TABLES.
W/O IF END IF
create procedre test() language sqlscript as
begin
itab1 = select * from AV_SOURCE ;
insert into <HANA_TABLE>
select * from <SAP_BW_TABLE>.
end;
call test().
Completed in 5 mins
With IF END IF
create procedre test(IN load_type,delta_in_days) language sqlscript as
begin
if load_type = 'F'
itab1 = select * from AV_SOURCE ;
insert into <HANA_TABLE>
select * from <SAP_BW_TABLE>.
endif;
end;
call test('F',0).
Running for more than 2 hrs.
Above two SQL's are same except IF clause.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.