MySQL Forums
Forum List  »  Stored Procedures

Re: How to increase the speed of a Function
Posted by: Roland Bouman
Date: November 07, 2005 04:59PM

Don't write a function to do this, use GROUP_CONCAT():


select group_concat(
concat(
designation
, ' '
, level
, strDel
)
separator ''
)
into returnStr
from cp_tsklevDes
inner join cp_designation
on fkey_deskey = deskey
where fkey_taskey = tskId


This would do away with the cursor and loop all together

see: http://dev.mysql.com/doc/refman/5.0/en/GROUP-BY-Functions.html



Edited 1 time(s). Last edit at 11/07/2005 05:00PM by Roland Bouman.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to increase the speed of a Function
3708
November 07, 2005 04:59PM


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.