You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/user-guide/configs.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,3 +192,31 @@ The following runtime configuration settings are available:
192
192
| datafusion.runtime.max_temp_directory_size | 100G | Maximum temporary file directory size. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes). Example: '2G' for 2 gigabytes. |
193
193
| datafusion.runtime.memory_limit | NULL | Maximum memory limit for query execution. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes). Example: '2G' for 2 gigabytes. |
194
194
| datafusion.runtime.temp_directory | NULL | The path to the temporary file directory. |
195
+
196
+
# Tuning Guide
197
+
198
+
## Short Queries
199
+
200
+
By default DataFusion will attempt to maximize parallelism and use all cores --
201
+
For example, if you have 32 cores, each plan will split the data into 32
202
+
partitions. However, if your data is small, the overhead of splitting the data
203
+
to enable parallelization can dominate the actual computation.
204
+
205
+
You can find out how many cores are being used via the [`EXPLAIN`] command and look
206
+
at the number of partitions in the plan.
207
+
208
+
[`explain`]: sql/explain.md
209
+
210
+
The `datafusion.optimizer.repartition_file_min_size` option controls the minimum file size the
211
+
[`ListingTable`] provider will attempt to repartition. However, this
212
+
does not apply to user defined data sources and only works when DataFusion has accurate statistics.
213
+
214
+
If you know your data is small, you can set the `datafusion.execution.target_partitions`
215
+
option to a smaller number to reduce the overhead of repartitioning. For very small datasets (e.g. less
216
+
than 1MB), we recommend setting `target_partitions` to 1 to avoid repartitioning altogether.
0 commit comments