|
在dm7上对比了这个简单函数, 发现比PostgreSQL快了15倍。
SQL>create function f1(x integer) return integer as
2 begin
3 if x <= 2 then
4 return 1;
5 end if;
6
7 return f1(x - 1) + f1(x - 2);
8 end;
9 /
操作已执行。
已用时间: 7.124(ms) clock tick:14580275. Execute id is 11.
SQL>select f1(30);
行号 F1(30)
---------- ----------
1 832040
已用时间: 599.961(ms) clock tick:1228712145. Execute id is 12.
SQL>/
行号 F1(30)
---------- ----------
1 832040
已用时间: 579.635(ms) clock tick:1187088734. Execute id is 13.
|
|