From: Adriano d. S. F. <adr...@uo...> - 2005-07-30 01:48:01
|
All, It appears that rand UDF (rand from MSVC7) is very bad. create table t (n double precision not null); set term !; create procedure sp_fill (n integer) as begin while (n > 0) do begin n = n - 1; insert into t (n) values (rand()); end end! set term ;! execute procedure sp_fill (100000); select first 20 n, count(*) from t group by n order by 2 desc; N COUNT ======================= ============ 0.2249519333475753 12 0.5224463637195960 12 0.6654560991241187 12 0.003631702627643666 11 0.09149449140903958 11 0.1555528427991577 11 0.3594775231177709 11 0.2959074678792688 11 0.4945524460585345 11 0.5142368846705527 11 0.01181066316721091 10 0.009918515579699088 10 0.06979583117160558 10 0.1017487105929746 10 0.09811700796533097 10 0.1127353740043336 10 0.1166417432172613 10 0.1553392132328257 10 0.2326731162450026 10 0.2409741508224738 10 Or am I missing something? Adriano |