go-clickhouse
go-clickhouse copied to clipboard
Could you add async_insert to options?
This is new feature for CH. Allows to avoid using buffer tables
New asynchronous INSERT mode allows to accumulate inserted data and store it in a single batch in background.
https://clickhouse.com/docs/ru/operations/settings/settings/#async-insert - by default=0
For now it solved adding user's profile. Maybe add to library not too problematic
<?xml version="1.0"?>
<yandex>
<profiles>
<http_writer>
<async_insert>1</async_insert>
</http_writer>
</profiles>
<users>
<gen_writer>
<profile>http_writer</profile>
</gen_writer>
</users>
</yandex>
Hi! Sorry for the late reply. In the current opts implementation you can pass any valid clickhouse option and it will be proxied to all the requests. Consider adding &async_insert=1 to your dsn or add it in cfg.Params