0 - 7 of 7 tags for execute stored procedure

Hi,
What are the things that I should look for when a stored procedure takes more time to execute than usual.
I understnd that stale stats can be the primary issue for such occurences but apart from that can there there be any other issues which can be resolved?
 
Thanks,
Gordon 

replace PROCEDURE db.sp_test (IN year_num INTEGER,IN descr varchar(250))
DYNAMIC RESULT SETS 1
BEGIN
DECLARE results1 CURSOR WITH RETURN ONLY FOR
select b.column, cast((a.column *100) as decimal(5,2)) as pct, a.column
from db1.tab1 as a inner join
db1.tab2 as b on(a.some_column=b.some_column) inner join

How to check whether the particular user has execute permission for the SP? If not how to grant?
 
Thanks in advance :)

How to execute teradata macro and stored procedure in XML?

 

Please let me know if the below statement are correct in terms of macro and SP execution inside XML

<Query> EXEC MACRO_NAME (Parm) </Query>

 

<Query> CALL PROCEDURE_NAME (parm) </query>

 

I am using a CONTINUE HANDLER as part of my stored procedure to manage Dropping of Indexes.

I do not want the SP to error out becuase an Index doesn't exist as I am just wanting to drop it any way.

The CONTINUE HANDLER does just fine if there is 1 index missing if there are multiple then the handler is no longer managing the process and the SP errors out with a message of 'Index doesn't exist'

DECLARE CONTINUE HANDLER FOR SQLSTATE VALUE '52004'
DDLERROR: BEGIN
INSERT INTO NSBI_TDB.ETL_DEBUG VALUES(CURRENT_TIMESTAMP(0), c_PROC_NM, 'INDEX0 DROP',SQLSTATE);

Hi,

I am using TD .NET provider 12.x and have stored procedures. All my SPs have IN & OUT parameters. In my understanding, TD has a strange way to returning the OUT params as a dataset & it works fine. When I have SP that delete records from a table, and also returns OUT params.

When I execute this Sp from .NET, I get a empty dataset (tables = 0). On checking the data, it actually deletes the data correctly. But how can I know that records are deleted? I don't want to unnecessarily check the data for delete confirmation.

any help is appreciated. Thanks.

SP Code: