GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — sqlite_bro experiment with duck_db · Issue #1257 · winpython/winpython

sqlite_bro experiment with duck_db #1257

New issue
Copy link
New issue
Copy link
Open
Open
sqlite_bro experiment with duck_db#1257
Copy link
Milestone
2026-01 python-3.14 full

Description

@stonebig
stonebig
opened on Aug 27, 2023
Issue body actions

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

Activity

  1. stonebig commented on Aug 27, 2023

    @stonebig
    stonebig
    on Aug 27, 2023
    ContributorAuthor
    More actions

    this takes 1 second (or less) on duckdB:
    select sum(sin(x)) from range(1 ,300001)cnt(x)

    so 10 seconds are due to not liking "recursive" CTE in a 300 000 loop (30 000 loop /second limit)

    Then there is a big slowdown in using UDF, versus SQLite.
    ( 3 000 loop/second limit, versus 300 000 loop/second for SQLite)

    not using "recursive" CTE and not using UDF (in this test) makes it quick like SQLite

  2. stonebig commented on Sep 3, 2023

    @stonebig
    stonebig
    on Sep 3, 2023
    ContributorAuthor
    More actions

    when duckdb gets less bad at UDF, it will be an interesting change
    becoming fluent with massive datas makes tcl/tk a problem.

  3. stonebig commented on Sep 30, 2023

    @stonebig
    stonebig
    on Sep 30, 2023
    ContributorAuthor
    More actions

    This takes 10 seconds to duckdb

    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  
      cnt(x) AS (
         SELECT * from generate_series (1, 30000 )
      )
    
    select sum(py_sin(x))  from cnt 
    `````
    
    
    This takes 0.1 second to duckdb
    `````
    WITH cnt(x)  AS (select * from generate_series(1, 3000000)  )
    
    select sum(sin(x))  from cnt ;
    ````
    
    
  4. stonebig
    added this to the 2025-05 buildable in the clouds ? milestone on May 4, 2025
  5. stonebig
    modified the milestones: 2025-05 better cloud build + 3.14 free-threading, 2026-01 pandas-3 on Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • 2026-01 python-3.14 full

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.