Property ImportBatchSize
- Namespace
- YndigoBlue.Velocity.Data
- Assembly
- YndigoBlue.Velocity.dll
ImportBatchSize
Gets or sets the batch size for import operations.
public int ImportBatchSize { get; set; }
Property Value
Remarks
This setting controls how many rows are inserted in each database transaction batch during import operations. The default value of 10,000 rows per batch balances performance and memory usage for most scenarios.
Performance and Resource Implications:
- Larger Batches (50,000+): Significantly faster imports because fewer round-trips to the database are required. However, uses more memory and increases the risk of running out of memory on resource-constrained systems. Best for small-to-medium row sizes and systems with available RAM.
- Smaller Batches (1,000-5,000): Slower imports due to more frequent database round-trips, but uses minimal memory. Recommended when importing rows with large data (wide tables, LOB columns) or on memory-constrained systems.
- Row Size Matters: A batch size of 10,000 rows with small data (integers, dates) uses far less memory than 10,000 rows with large data (XML, JSON, binary, geographic data). Adjust batch size based on your actual row size.
- Database Constraints: Some databases have limits on batch size or maximum statement size. If imports fail with "statement too large" errors, reduce the batch size.
Tuning this value requires balancing import speed against memory availability. Start with the default and adjust based on your system's performance characteristics and constraints.