Skip to content

Execution speed #3

@BorgeJorge

Description

@BorgeJorge

Thank you so much for your work on this! I thought you might be interested in a report on execution speed in R.

I'm running R 4.4.2 in Windows 10 with DuckDB 1.2.1 and read_stat installed today, and reading in a SAS file with ~1M records and 3 variables:

library(tidyverse)
library(haven)
library(duckdb)
library(tictoc)
con <- dbConnect(duckdb(), dbdir="test.duckdb")
dbExecute(con, "load read_stat")

tic()
read_sas("d:/duckdb/temp.sas7bdat") %>% 
  dbWriteTable(con,"test1", ., overwrite=TRUE)
toc()

tic()
dbExecute(con, "create or replace table test2 as
                  select * from read_stat('d:/duckdb/temp.sas7bdat')")
toc()

dbDisconnect(con, shutdown=TRUE)

The haven/DBI runtime is 2.71 seconds. The DuckDB/read_stat runtime is 10.93 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions