Quantcast
Channel: SCN: Message List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 8968

Re: Assignment to an OUT variable in procedure is taking a lot of time

$
0
0

Hi Lucas,

 

     Thank you for helping me out.

 

Below is my code.

drop procedure TEST_SCHEMA.TEST_PROCEDURE;
create procedure TEST_SCHEMA.TEST_PROCEDURE  (OUT DOCUMENT_REDUCED table
(id integer, hash varchar(100), source varchar(500), headline varchar(1000)))
LANGUAGE SQLSCRIPT 
AS
BEGIN
DOCUMENT_REDUCED = select id,hash,source,headline from  TEST_SCHEMA."DOCUMENTS" where id <= 5 ;
END;
call TEST_SCHEMA.TEST_PROCEDURE(?);

the above call takes around 7 minutes to be executed even though my table has only 18 rows now and needs to fetch 10 rows.

 

Statement 'call TEST_SCHEMA.TEST_PROCEDURE(?)'

successfully executed in 7:06.277 minutes  (server processing time: 7:06.086 minutes)

Duration of 3 statements: 7:06.575 minutes

Fetched 10 row(s) in 0 ms 147 µs (server processing time: 0 ms 0 µs)

 

if out_variable is not in procedure argument, then the select statement returns the result set within few milliseconds.

a screen shot of plan viz has been attached.

 

Thanks,

Srinivas


Viewing all articles
Browse latest Browse all 8968

Trending Articles



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