**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 :(
/// Buffer for reading from file is created and wrapped with appropriate compression method
        auto in_buffer = wrapReadBufferWithCompressionMethod(std::make_unique<ReadBufferFromFile>(in_file), chooseCompressionMethod(in_file, compression_method)
        try
        {
            sendDataFrom(*in_buffer, sample, columns_description, parsed_query
        }
        catch (Exception & e)
        {
            e.addMessage("data for INSERT was parsed from file"
            throw;
        }
    }
    else if (parsed_insert_query->data)
    {
        /// Send data contained in the query.
        ReadBufferFromMemory data_in(parsed_insert_query->data, parsed_insert_query->end - parsed_insert_query->data
        try
        {
            sendDataFrom(data_in, sample, columns_description, parsed_query
        }
        catch (Exception & e)
        {
            /// The following query will use data from input
            //      "INSERT INTO data FORMAT TSV\n " < data.csv
            //  And may be pretty hard to debug, so add information about data source to make it easier.
            e.addMessage("data for INSERT was parsed from query"
            throw;
        }
        // Remember where the data ended. We use this info later to determine
        // where the next query begins.