Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many threads is DuckDB using?

Tags:

r

duckdb

Using duckDB from within R, e.g.

library(duckdb)
dbname <- "sparsemat.duckdb"
con2 <- dbConnect(duckdb(), dbname)
dbExecute(con2, "PRAGMA memory_limit='1GB';")

how can I find out how many threads the (separate process) is using? I am aware of

dbExecute(con2, "PRAGMA threads=4;")

but I am interested in figuring out reading this configuration detail, not setting it.

like image 550
Karsten W. Avatar asked Jan 26 '26 03:01

Karsten W.


1 Answers

Below query will read the configuration

-- show a list of all available settings
SELECT * FROM duckdb_settings();

-- return the current value of a specific setting
SELECT current_setting('threads')
like image 60
ns94 Avatar answered Jan 28 '26 19:01

ns94



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!