Adaptive Chunks¶
Chunk sizes adapt based on workload characteristics.
Chunk Size Selection¶
| Factor | Smaller Chunks | Larger Chunks |
|---|---|---|
| Selectivity | High (few pass filter) | Low (many pass) |
| LIMIT | Small limit | No limit |
| Memory | Limited memory | Ample memory |
Adaptive Strategy¶
- Start with default chunk size (1024-2048 rows)
- Monitor selectivity and throughput
- Adjust chunk size for subsequent operations
- Balance cache efficiency vs overhead
Benefits¶
- LIMIT optimization - Small chunks for early termination
- Memory efficiency - Smaller chunks for memory-constrained ops
- Throughput - Larger chunks for full scans