Skip navigation links

MySQL Forums :: Performance :: Stored Procedure too slow


Advanced Search

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 1572 Cristiano Ghersi 12/03/2012 04:46AM
Re: Stored Procedure too slow 773 Aftab Khan 12/03/2012 09:00AM
Re: Stored Procedure too slow 579 Cristiano Ghersi 12/03/2012 09:27AM
Re: Stored Procedure too slow 646 Rick James 12/04/2012 12:20AM
Re: Stored Procedure too slow 803 Cristiano Ghersi 12/04/2012 07:02AM
Re: Stored Procedure too slow 640 Rick James 12/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.