All Integrations
DatabasesTigerOps SDK

DuckDB Integration

Monitor analytical query performance, memory utilization, and extension metrics for your DuckDB workloads. Get query plan capture, memory spill alerts, and AI optimization recommendations from your in-process analytics engine.

Setup

How It Works

01

Install the TigerOps DuckDB SDK

Add the TigerOps SDK for Python, Node.js, or Go to your application. The SDK wraps your DuckDB connection and instruments query execution, memory allocation, and extension calls without modifying your analytics code.

02

Configure Memory & Query Thresholds

Set memory utilization alert thresholds and slow query duration cutoffs for your DuckDB workloads. TigerOps reads DuckDB internal metrics via the duckdb_memory_usage() and duckdb_profiling_output() functions.

03

Enable Query Profiling

Activate DuckDB query profiling via PRAGMA enable_profiling in your TigerOps config. The SDK captures execution plans, operator timings, and row count statistics for queries exceeding your slow query threshold.

04

Correlate with Data Pipeline Health

TigerOps links DuckDB analytical query latency to upstream data ingestion events — Parquet file scans, S3 read throughput, and external table read latency — giving you end-to-end pipeline performance visibility.

Capabilities

What You Get Out of the Box

Analytical Query Performance

Per-query execution time, operator-level breakdowns, rows processed per second, and query plan capture for slow queries. Track complex aggregation and join performance over time.

Memory Utilization Tracking

DuckDB buffer pool usage, memory allocator peak consumption, out-of-core spill-to-disk events, and temporary file I/O rates for queries that exceed your in-memory budget.

Extension Performance Metrics

Per-extension function call counts and execution times for httpfs, parquet, json, spatial, and delta extensions. Track which extensions are contributing to query latency.

Parquet & External File Scanning

Parquet file scan throughput, row group pruning effectiveness, predicate pushdown hit rates, and S3/GCS/Azure Blob read latency when using DuckDB with cloud object stores.

Concurrent Query Management

Active query concurrency, thread pool utilization, task scheduler queue depth, and parallelism efficiency metrics for DuckDB running multi-threaded analytical workloads.

AI Query Plan Optimization

TigerOps AI analyzes captured DuckDB query plans to identify suboptimal join orders, missing statistics, full dataset scans that could be pruned, and recommends query rewrites or index creation.

Configuration

TigerOps DuckDB SDK Integration

Instrument your DuckDB analytical workloads in Python with the TigerOps SDK.

duckdb_instrumentation.py
# Install: pip install tigerops-duckdb duckdb

import duckdb
from tigerops.duckdb import instrument

# Wrap your DuckDB connection
raw_conn = duckdb.connect("analytics.duckdb")
conn = instrument(raw_conn, config={
    "api_key": os.environ["TIGEROPS_API_KEY"],
    "database_name": "analytics-production",

    # Query profiling settings
    "slow_query_threshold_ms": 1000,
    "capture_explain_analyze": True,
    "profile_top_n_operators": 10,

    # Memory monitoring
    "memory_alert_threshold_gb": 8.0,
    "spill_to_disk_alert": True,

    # Extension metrics
    "track_extension_calls": True,
    "extensions": ["httpfs", "parquet", "delta"],

    # Flush interval
    "metrics_flush_interval_s": 15,
})

# DuckDB PRAGMA configuration
conn.execute("PRAGMA memory_limit='12GB'")
conn.execute("PRAGMA threads=8")
conn.execute("PRAGMA enable_profiling='json'")

# Use conn exactly as before
result = conn.execute("""
    SELECT category, SUM(revenue) as total
    FROM read_parquet('s3://my-bucket/events/*.parquet')
    GROUP BY category
    ORDER BY total DESC
""").fetchall()
FAQ

Common Questions

Does TigerOps support DuckDB running in-process and as a server?

Yes. TigerOps supports both the in-process DuckDB library (used in Python, Node.js, Go, and Rust applications) and DuckDB running via the JDBC/ODBC server mode. The SDK wrapper works transparently in both configurations.

How does TigerOps capture DuckDB query execution plans?

When a query exceeds your slow query threshold, TigerOps executes EXPLAIN ANALYZE on the query via a separate connection and captures the JSON profiling output. This is done asynchronously so it does not block the original query execution.

Can TigerOps monitor DuckDB reading from S3 or cloud object stores?

Yes. TigerOps instruments the httpfs extension calls and tracks S3 GET request counts, bytes read, and round-trip latency per query. You can see exactly how much of your query time is spent on cloud I/O versus local CPU computation.

Does TigerOps work with MotherDuck (the managed DuckDB cloud service)?

Yes. TigerOps connects to MotherDuck via the standard DuckDB Python or Node.js client and collects the same query performance and memory metrics. The MotherDuck service token is passed as the connection credential.

How does TigerOps alert on DuckDB memory spill-to-disk events?

TigerOps monitors the DuckDB temporary directory for spill file creation events and tracks total spill volume per query. When queries begin spilling to disk, TigerOps fires an alert with the query fingerprint, spill size, and a suggestion to increase the memory_limit PRAGMA.

Get Started

Stop Guessing Why Your DuckDB Queries Are Slow

Query plan capture, memory spill detection, and AI optimization recommendations. Instrument in 5 minutes.