Joinutility seperatorLogin utility separator Infobright.com
   
 
Problems with running a Stored Function
Posted: 16 March 2010 09:58 PM   Ignore ]  
Newbie
Rank
Total Posts:  5
Joined  2010-03-16

Hi, I have a trades table with about 200M records. There is also a stored function called fnClosePrice() with the following definition…
BEGIN
declare cp float;
set cp=0.45;
return cp;
END

select fnClosePrice(); runs as expected and returns 0.45

A simple query on the trades table like the following also runs fine…

select bsid,time from trades limit 100;

However, when I include the function in the above query i get an error…

select bsid, fnClosePrice() from trades limit 100;

The query includes syntax that is not supported by the Infobright Optimizer. Either restructure the query with supported syntax, or enable the MySQL Query Path in the brighthouse.ini file to execute the query with reduced performance.

what am I missing here? any insight is appreciated.

thanks

Profile
 
Posted: 17 March 2010 05:37 AM   Ignore ]   [ # 1 ]  
Super Duper Member
Avatar
RankRankRankRankRank
Total Posts:  916
Joined  2008-08-18

Hi !

ICE does not support stored functions. “select fnClosePrice();” is executed by mysql engine and therefore it completes.

Profile
 
Posted: 17 March 2010 10:35 AM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  5
Joined  2010-03-16

Thanks Janusz, I saw Stored Procedures were supported and assumed functions are as well.

Profile