Every clickhouse-local process uses the same default database -- DatabaseMemory called '_local', with data stored in current directory. This leads to counterintuitive interaction between the instances, if you just want to process some data in parallel.
A solution is to use a unique data path for each instance (add pid to path), if not explicitly specified. We should also move it to /tmp because current directory might not even be writable.
There still is a way to explicitly specify a particular data path using --path option:
$ clickhouse-local --query "select count(*) from default.hits" -- --path db
8873898
Every clickhouse-local process uses the same default database -- DatabaseMemory called '_local', with data stored in current directory. This leads to counterintuitive interaction between the instances, if you just want to process some data in parallel.
A solution is to use a unique data path for each instance (add pid to path), if not explicitly specified. We should also move it to
/tmpbecause current directory might not even be writable.There still is a way to explicitly specify a particular data path using
--pathoption: