Skip to content

Commit 38c8b19

Browse files
update batch size in session config (#1250)
current: 1000000 update to 8192 (default value) this helps in query performance as larger batch size consumes more memory and slows down performance with this change, parseable's clickbench numbers are [181,68,68]
1 parent 9287d55 commit 38c8b19

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/cli.rs

+8
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,14 @@ pub struct Options {
270270
)]
271271
pub row_group_size: usize,
272272

273+
#[arg(
274+
long,
275+
env = "P_EXECUTION_BATCH_SIZE",
276+
default_value = "20000",
277+
help = "batch size for query execution"
278+
)]
279+
pub execution_batch_size: usize,
280+
273281
#[arg(
274282
long = "compression-algo",
275283
env = "P_PARQUET_COMPRESSION_ALGO",

src/query/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ impl Query {
111111
let mut config = SessionConfig::default()
112112
.with_parquet_pruning(true)
113113
.with_prefer_existing_sort(true)
114-
.with_batch_size(1000000);
114+
//batch size has been made configurable via environment variable
115+
//default value is 20000
116+
.with_batch_size(PARSEABLE.options.execution_batch_size);
115117

116118
// Pushdown filters allows DF to push the filters as far down in the plan as possible
117119
// and thus, reducing the number of rows decoded

0 commit comments

Comments
 (0)