ClickHouse/clickhouse-cpp

Question: Fetching while processing.

andersc opened this issue · 2 comments

Hi.

I'm using the client -> Select method fetching a large amount of data. Is there a method for getting the data as it's being downloaded to the client. As of right now I query the database and have to wait for 14 seconds for the data. Then the lambda is triggered giving me all blocks. For me it would be beneficial to get each block of data as it's beeing retrieved.

Thanks for helping.

/A

Enmk commented

Hi @andersc ! Right now callback is triggered for each received block, you can either aggregate those or pass to some sort of handler in your code (typically by copying Block instance, it is safe).

@Enmk thanks for the clarification, what you say is correct. I did my time-measure at the wrong part of the code.

Will close.

Thanks for your responce.

/A