UDF behaves non-deterministic

2012-11-04 Thread Stefan Kuhn
Hi all, I have a weired (for me at least) problem with a user defined function, written in C. The function seems to return different results in different runs (the code of the function does not contain random elements). Basically, the function calculates a score based on a column in a table and

Re: UDF behaves non-deterministic

2012-11-04 Thread Michael Dykman
A couple of questions present. You mention that selecting from the whole table takes 5-10s so I assume you have a lot of records. is the data not in flux? are you sure? these conflict queries are all on the same server? i would have structured the query like so: select *,

Re: UDF behaves non-deterministic

2012-11-04 Thread Stefan Kuhn
On Sunday 04 November 2012 22:34:22 Michael Dykman wrote: A couple of questions present. You mention that selecting from the whole table takes 5-10s so I assume you have a lot of records. Yes, and the calculation of the score is fairly complicated. Plust the test server is slow (Pentium III

Re: UDF behaves non-deterministic

2012-11-04 Thread Dan Nelson
In the last episode (Nov 04), Stefan Kuhn said: I have a weired (for me at least) problem with a user defined function, written in C. The function seems to return different results in different runs (the code of the function does not contain random elements). Basically, the function