diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 46fa915595e..7114daaec33 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -501,6 +501,7 @@ class IColumn; \ M(String, local_filesystem_read_method, "pread", "Method of reading data from local filesystem, one of: read, pread, mmap, pread_threadpool.", 0) \ M(Bool, local_filesystem_read_prefetch, false, "Should use prefetching when reading data from local filesystem.", 0) \ + M(Bool, remote_filesystem_read_prefetch, true, "Should use prefetching when reading data from remote filesystem.", 0) \ M(Int64, read_priority, 0, "Priority to read data from local filesystem. Only supported for 'pread_threadpool' method.", 0) \ \ /** Experimental functions */ \ diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index 436f88763fd..9fe14cf44d6 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -2709,6 +2709,8 @@ ReadSettings Context::getReadSettings() const throw Exception(ErrorCodes::UNKNOWN_READ_METHOD, "Unknown read method '{}'", settings.local_filesystem_read_method.value); res.local_fs_prefetch = settings.local_filesystem_read_prefetch; + res.remote_fs_prefetch = settings.remote_filesystem_read_prefetch; + res.local_fs_buffer_size = settings.max_read_buffer_size; res.direct_io_threshold = settings.min_bytes_to_use_direct_io; res.mmap_threshold = settings.min_bytes_to_use_mmap_io;