2

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.

Karsten W.
  • 17,826
  • 11
  • 69
  • 103

1 Answers1

3

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')
ns15
  • 5,604
  • 47
  • 51