harmonic mean in SQL

2010-10-21 Thread Ted Yu
Hi, The mathematical way to add two partial harmonic means to generate new harmonic mean is: Let X1 , X2 be two harmonic means on different rollup rows, generated using n1 and n2 # of facts respectively. The combined harmonic mean would be: (n1 + n2)/( n1/x1 + n2/x2) If you have experience

mysql and tomcat

2010-02-16 Thread Ted Yu
Hi, In our deployment, mysql needs to be started before tomcat automatically after server restart. If you know how this order can be specified, please share. We use tomcat6 on Linux tyu-linux 2.6.18-128.2.1.el5 #1 SMP Tue Jul 14 06:36:37 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux Thanks

tuning stored procedures

2010-01-15 Thread Ted Yu
Hi, We currently use SQL statements embedded in Java code. I believe stored procedures would give us better performance. I found http://lists.mysql.com/maxdb/16680 which is very old. Can someone share stored procedures tuning practices ? Thanks

Re: unable to create function in MySQL 5.0

2006-12-01 Thread Ted Yu
Yes. MySQL was upgraded. What's the name of upgrade script and where is it ? --- Martijn Tonies [EMAIL PROTECTED] wrote: Hello Ted, I got an error that I don't understand: Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3080

Can't initialize function

2006-12-01 Thread Ted Yu
Hi, My initialization for UDF is quite simple: my_bool do_system_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { initid-max_length = 256; initid-maybe_null=1; args-arg_type[0]=STRING_RESULT; initid-ptr = NULL; return 0; } But I got: Welcome to the

unable to create function in MySQL 5.0

2006-11-30 Thread Ted Yu
I got an error that I don't understand: Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3080 to server version: 5.0.18-log mysql create function do_system returns integer soname 'raptor_udf.so'// ERROR 1146 (42S02): Table 'mysql.proc' doesn't

username audit column

2006-11-29 Thread Ted Yu
Has any MySQL user established triggers to fill out the audit columns (such as CREATED_BY - username that performs the underlying operation) ? Thanks Want to start your own business? Learn how on Yahoo!

Re: username audit column

2006-11-29 Thread Ted Yu
By username I mean Linux login. Is there a way to call Perl/Shell script to obtain this information ? --- Ted Yu [EMAIL PROTECTED] wrote: Has any MySQL user established triggers to fill out the audit columns (such as CREATED_BY - username that performs the underlying operation) ? Thanks

before update trigger syntax

2006-11-29 Thread Ted Yu
Can someone tell me what's wrong with my before update trigger syntax ? Thanks Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 19 to server version: 5.0.18-log mysql use eventtracker; Reading table information for completion of table and column names You