with duckdb-0.8.0
pydef py_sin(s:int) ->float:
"sinus function : example loading module, handling input/output as strings"
import math as py_math
return ( py_math.sin(s*1));
WITH RECURSIVE
cnt(x) AS (
SELECT 1
UNION ALL
SELECT x+1 FROM cnt
where x < 300000
)
select sum(py_sin(x)) from cnt
takes 130 seconds, while 0.4 seconds with SQLite
WITH RECURSIVE
cnt(x) AS (
SELECT 1
UNION ALL
SELECT x+1 FROM cnt
where x < 300000
)
select sum(sin(x)) from cnt
takes also 110 seconds, while 0.1 second with SQLite integrated math
Reactions are currently unavailable
with duckdb-0.8.0
pydef py_sin(s:int) ->float: "sinus function : example loading module, handling input/output as strings" import math as py_math return ( py_math.sin(s*1)); WITH RECURSIVE cnt(x) AS ( SELECT 1 UNION ALL SELECT x+1 FROM cnt where x < 300000 ) select sum(py_sin(x)) from cnttakes 130 seconds, while 0.4 seconds with SQLite
WITH RECURSIVE cnt(x) AS ( SELECT 1 UNION ALL SELECT x+1 FROM cnt where x < 300000 ) select sum(sin(x)) from cnttakes also 110 seconds, while 0.1 second with SQLite integrated math