Available Engines
Setting the Engine
Global Configuration
Checking Current Engine
Auto Mode
Inauto mode (default), DataStore selects the optimal engine for each operation:
Operations Executed in chDB
- SQL-compatible filtering (
filter(),where()) - Column selection (
select()) - Sorting (
sort(),orderby()) - Grouping and aggregation (
groupby().agg()) - Joins (
join(),merge()) - Distinct (
distinct(),drop_duplicates()) - Limiting (
limit(),head(),tail())
Operations Executed in pandas
- Custom apply functions (
apply(custom_func)) - Complex pivot tables with custom aggregations
- Operations not expressible in SQL
- When input is already a pandas DataFrame
Example
chDB Mode
Force all operations through ClickHouse SQL:When to Use
- Processing large datasets (millions of rows)
- Heavy aggregation workloads
- When you want maximum SQL optimization
- Consistent behavior across all operations
Performance Characteristics
Limitations
- Custom Python functions may not be supported
- Some pandas-specific features require conversion
pandas Mode
Force all operations through pandas:When to Use
- Compatibility testing with pandas
- Using pandas-specific features
- Debugging pandas-related issues
- When data is already in pandas format
Performance Characteristics
Cross-DataStore Engine
Configure the engine for operations that combine columns from different DataStores:Example
Engine Selection Logic
Auto Mode Decision Tree
Function-Level Override
Some functions can have their engine explicitly configured:Performance Comparison
Benchmark results on 10M rows:
Key insights:
- chDB excels at aggregations and complex pipelines
- pandas is slightly faster for simple single operations
- Use
automode to get the best of both