**Describe the situation**

```
SELECT * FROM test.hits INTO OUTFILE 'dump.csv' FORMAT CSV

8873898 rows in set. Elapsed: 32.487 sec. Processed 8.87 million rows, 8.46 GB (273.15 thousand rows/s., 260.42 MB/s.)
```

is bounded by single CPU core. Too slow :(
{
        const char * home_path_cstr = getenv("HOME"
        if (home_path_cstr)
            home_path = home_path_cstr;
    }
    /// Initialize query_id_formats if any
    if (config().has("query_id_formats"))
    {
        Poco::Util::AbstractConfiguration::Keys keys;
        config().keys("query_id_formats", keys
        for (const auto & name : keys)
            query_id_formats.emplace_back(name + ":", config().getString("query_id_formats." + name)
    }
    if (query_id_formats.empty())
        query_id_formats.emplace_back("Query id:", " {query_id}\n"
    /// Load command history if present.
    ))
        history_file = config().getString("history_file"
    else
    {
        auto * history_file_from_env = getenv("CLICKHOUSE_HISTORY_FILE"
        if (history_file_from_env)
            history_file = history_file_from_env;
        else if (!home_path.empty())
            history_file = home_path + "/.clickhouse-client-history";
    }
    if (!history_file.empty() && !fs::exists(history_file))
    {
        /// Avoid TOCTOU issue.
        try