MySQL Forums
Forum List  »  Performance

Stored Procedure too slow
Posted by: Cristiano Ghersi
Date: December 03, 2012 04:46AM

Hi all,
I've created a very simple Stored procedure, with a single insert statement in a table with autoincrement PK.
To test the performances, I tried to call this SP fro another SP, written in this way:
CREATE PROCEDURE `testAddPhysNode`(
IN _iterations INT,
IN _startIter INT,
IN _netID INT
)
BEGIN
DECLARE _type INT;
DECLARE _newid INT; --this is output param
DECLARE _creat BIT; --this is output param
SET _type = _startIter;

WHILE (_type < (_startIter + _iterations)) DO
CALL AddPhysNode(1, 123, 1, 'test', 0x1234, 0x1256,
_netID, 1, _type, _newid, _creat);
SET _type = _type + 1;
END WHILE;
END

which results in an average computation time of the AddPhysNode SP of 10 millisec.
Now my question is: are 10 milliseconds a usual time for the invocation of a simple SP?
If not, am I missing anything? Is my benchmark realistic?

Thank you very much
Best
cghersi

Options: ReplyQuote


Subject
Views
Written By
Posted
Stored Procedure too slow
2449
December 03, 2012 04:46AM
1243
December 03, 2012 09:00AM
862
December 03, 2012 09:27AM
926
December 04, 2012 12:20AM
1339
December 04, 2012 07:02AM
1012
December 05, 2012 12:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.