List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:November 11 1999 4:30pm
Subject:UD Function vs. Procedure (e.g. AVG())
View as plain text  
>>>>> "Frank" == Frank Oellien <franko@stripped>
> writes:

Frank> Hello,
Frank> we want to add some new algoithms to our database like linear regression
Frank> or calculation of correlation coefficients. First we thought that we can
Frank> handle the problem by adding a ne User-defined function. But our
Frank> functions will only work with the values of each row. So, GROUP BY has
Frank> no effect. However, for mathematical calculations like a linear
Frank> regression it is necessarily to have a list of values. So it seems that
Frank> "functions" like avg() or count() are also procedures, are they?
Frank> My question is: Must we create a new procedure to aim this goal? And
Frank> when the answer is Yes - How is able to give us more information about
Frank> procedures in mysql?

Frank> We are using the following version:
Frank> mysqladmin  Ver 7.11 Distrib 3.22.26a, for pc-linux-gnu on i686
Frank> TCX Datakonsult AB, by Monty

Frank> Server version          3.22.26a-log
Frank> Protocol version        10
Frank> Connection              Localhost via UNIX socket
Frank> UNIX socket             /tmp/mysql.sock
Frank> Uptime:                 21 hours 41 min 44 sec

Frank> Threads: 3  Questions: 5568134  Slow queries: 26  Opens: 120  Flush
Frank> tables: 1  Open tables: 27

Frank> With regards
Frank> Frank Oellien


Hi!

In MySQL 3.23 you can write UDF functions that works on many rows
(like AVG). Please consult the MySQL manual about this!

Regards,
Monty

PS: Sorry for the long delay before replying, but I just come back from
    a 2 weeks vacation trip.
Thread
UD Function vs. Procedure (e.g. AVG())Frank Oellien21 Oct
  • Re: UD Function vs. Procedure (e.g. AVG())sinisa22 Oct
  • UD Function vs. Procedure (e.g. AVG())Michael Widenius11 Nov