Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
21
Task/Time-a-function/DuckDB/time-a-function.duckdb
Normal file
21
Task/Time-a-function/DuckDB/time-a-function.duckdb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# A table
|
||||
create or replace function countto(n) as (
|
||||
with recursive cte as (
|
||||
select 0 as ix
|
||||
union all
|
||||
select ix+1
|
||||
from cte
|
||||
where ix < n)
|
||||
select last(ix order by ix)
|
||||
from cte
|
||||
);
|
||||
|
||||
.timer on
|
||||
.print .timer is now on
|
||||
.print 10^4
|
||||
select length(range(0, 10_000));
|
||||
select countto(10 ^ 4);
|
||||
|
||||
.print 10^5
|
||||
select length(range(0, 100_000));
|
||||
select countto(10 ^ 5);
|
||||
Loading…
Add table
Add a link
Reference in a new issue