Results of 1 - 10 of about 54 for Threads (0.002 sec.)
- I/O 12326
- Warning DuckDB ships with safe defaults. The configuration options described on this page are advanced options, so proceed with caution when changing them. Asynchronous I/O New Asynchronous I/O was introduced in DuckDB 2.0. Starting with v2
...ead until requested data arrives, DuckDB issues reads in the background and keeps multiple requests in flight while worker threads process data that has already arrived. This can significantly speed up queries when synchronous I/O does not saturate the...rough data lake formats such as DuckLake . Thread Pools DuckDB uses two thread pools: The regular pool contains the worker threads, which perform the actual query processing (e.g., decoding, joins and aggregations). Its size is controlled by the threads...setting and defaults to the number of CPU cores. Regular threads prioritize query processing but can also perform I/O tasks when idle. The asynchronous pool contains threads dedicated to... - https://man.mtool.work/duckdb/2.0/data/io.html
- Multiple Python Threads 12282
- This page demonstrates how to simultaneously insert into and read from a DuckDB database across multiple Python threads. This could be useful in scenarios where new data is flowing in and an analysis should be periodically re-run. Note that
...EFAULT current_timestamp ) """) Reader and Writer Functions Next, define functions to be executed by the writer and reader threads. Each thread must use the .cursor() method to create a thread-local connection to the same DuckDB file based on the origin...S row_counter, current_localtimestamp() AS read_time FROM my_inserts """, (thread_name,)).fetchall() print(results) Create Threads We define how many writers and readers to use, and define a list to track all of the threads that will be created. Then, c...reate first writer and then reader threads. Next, shuffle them so that they will be kicked off in a random order to simulate simultaneous writers and readers. Note t... - https://man.mtool.work/duckdb/2.0/guides/python/multiple_threads.html
- Connect 12089
- Overview Every DuckDB feature reachable from Java starts with a Connection . This page covers the JDBC URL forms the driver accepts, how DuckDB and driver options are passed and which of them win, how connections come to share (or not share
...) an underlying database instance, how DuckDB's threads relate to that instance, how to open or attach a DuckLake , and how to reach a remote DuckDB server over Quack . Opening a...ly way to configure DuckDB in tools that accept a connection string but no Properties object: jdbc:duckdb:/tmp/my_database;threads=4;memory_limit=4GB;jdbc_stream_results=true Each entry is a key=value pair and surrounding whitespace is trimmed. The driv...the same option appears in both places, the value in the URL wins: Properties props = new Properties(); props.setProperty("threads", "8"); // The connection is opened with threads = 4. Connection conn = DriverManager.getConnection("jdbc:duckdb:/tmp/my_d... - https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
- SET and RESET Statements 9256
- The SET statement modifies the provided DuckDB configuration option at the specified scope. Examples Update the memory_limit configuration value: SET memory_limit = '10GB'; Configure the system to use 1 thread: SET threads = 1; Or use the T
...O keyword: SET threads TO 1; Change configuration option to default value: RESET threads; Retrieve configuration value: SELECT current_setting('t...= 'nocase'; Set a Global Variable Set the default sort order globally: SET GLOBAL default_order = 'DESC'; Set the default threads globally: SET GLOBAL threads = 4; Syntax SET updates a DuckDB configuration option to the provided value. RESET The RESET... - https://man.mtool.work/duckdb/2.0/sql/statements/set.html
- Configuration 9018
- DuckDB has a number of configuration options that can be used to change the behavior of the system. The configuration options can be set using either the SET statement or the PRAGMA statement . They can be reset to their original values usi
...Examples Set the memory limit of the system to 10 GB. SET memory_limit = '10GB'; Configure the system to use 1 thread. SET threads TO 1; Turn logging on and set the logging level to debug . For additional details on logging levels, see Log Level . In th...ULLS LAST : SET default_null_order = 'nulls_last'; Return the current value of a specific setting: SELECT current_setting('threads') AS threads; threads 10 Query a specific setting: SELECT * FROM duckdb_settings() WHERE name = 'threads'; name value desc...ription input_type scope threads 1 The number of total threads used by the system. BIGINT GLOBAL Show a list of all available settings: SELECT * FROM duckd... - https://man.mtool.work/duckdb/2.0/configuration/overview.html
- jemalloc 8929
- On supported platforms, DuckDB replaces the system's memory allocator with jemalloc . jemalloc is statically linked into DuckDB and cannot be installed or loaded during runtime. For technical reasons, we used to distribute jemalloc as an ex
...but DuckDB uses a different environment variable name to avoid potential name clashes with other applications. Background Threads By default, jemalloc's background threads are disabled. To enable them, use the following configuration option: SET alloca...tor_background_threads = true; Background threads asynchronously purge outstanding allocations so that this doesn't have to be done synchronously...by the foreground threads. This improves allocation performance, and should be noticeable in allocation-heavy workloads, especially on many-core CPU... - https://man.mtool.work/duckdb/2.0/internals/jemalloc.html
- Connect 8781
- Overview Every DuckDB feature reachable from Rust starts with a Connection . Opening in-memory and file-backed databases, configuring a database instance with Config , opening read-only, pooling connections across threads, the crate's threa
...DuckDB validates the option: use duckdb::{Config, Connection, Result}; let config = Config::default() .max_memory("4GB")? .threads(4)?; let conn = Connection::open_with_flags("my_database.duckdb", config)?; Config exposes typed methods for the most comm...on options, including access_mode() , max_memory() , threads() , default_order() , default_null_order() , enable_external_access() , enable_object_cache() , custom_user_agent() , and...h_flags("my_database.duckdb", config)?; AccessMode has three variants: Automatic (the default), ReadOnly , and ReadWrite . Thread Safety A Connection is Send but not Sync : it can be moved to another thread, but it cannot be shared between threads at th... - https://man.mtool.work/duckdb/2.0/clients/rust/connecting.html
- Julia Client 8737
- The DuckDB Julia package provides a high-performance front-end for DuckDB. Much like SQLite, DuckDB runs in-process within the Julia client, and provides a DBInterface front-end. The package also supports multi-threaded execution. It uses J
...ulia threads/tasks for this purpose. If you wish to run queries in parallel, you must launch Julia with multi-threading support (by e.g...., setting the JULIA_NUM_THREADS environment variable). Installation Install DuckDB as follows: using Pkg Pkg.add("DuckDB") Alternatively, enter the packag...conn, "SELECT id, count(date) AS count, max(date) AS max_date FROM data GROUP BY id ORDER BY id") |> DataFrames.DataFrame) Threads.sleep(1) end DBInterface.close(conn) end # spawn one reader task Threads.@spawn run_reader(db) function run_inserter(db, i... - https://man.mtool.work/duckdb/2.0/clients/tertiary_clients/julia.html
- Python API 8588
- Installation To use the DuckDB Python client, visit the Python installation page . The latest stable version of the DuckDB Python client is 2.0.0. Installation The DuckDB Python API can be installed using pip : pip install duckdb . Please s
...config dictionary, where configuration options can be specified. For example: import duckdb con = duckdb.connect(config={"threads": 1}) Besides its worker threads, each database starts a pool of asynchronous I/O threads : by default four times the numb...er of CPU cores, at most 256. To start fewer, set async_threads : con = duckdb.connect(config={"threads": 4, "async_threads": 4}) To specify the storage version , pass the storage_compat..._even(cursor, results): results.append(cursor.sql("SELECT count(*) FROM numbers WHERE n % 2 = 0").fetchall()) results = [] threads = [threading.Thread(target=count_even, args=(con.cursor(), results)) for _ in range(4)] for thread in threads: thread.star... - https://man.mtool.work/duckdb/2.0/clients/python/overview.html
- PostgreSQL Extension Connection Pool 8544
- PostgreSQL server spawns a backend process for every incoming client connection. This model leads to the two following points with the postgres extension that can cause performance problems: opening a new connection is relatively expensive
...le PostgreSQL table. The number of parallel queries running for a single table scan can be as high as the number of worker threads of the current DB instance ( threads global configuration option). When the threads parameter is set too high (that may be...- then that worked thread does not participate futher in the processing of this table scan, that proceeds with the worker threads that were able to acquire a connection from the pool. See the description of the postgres_configure_pool function for deta...n idle connection to be returned to a thread-local (and thread-private) cache instead of the main cache shared between all threads. Warning Thread-local connection are not checked and not cleaned up by the reaper thread. Thread-local cache should be use... - https://man.mtool.work/duckdb/2.0/core_extensions/postgres/connection_pool.html
DuckDB 2.0 Documentation / man.mtool.work