1. Can Distributed table belong to a database (i.e., my_db) other than default?
For example,
For local table
CREATE TABLE my_db.ontime_local (...) ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);
For distributed table
CREATE TABLE my_db.ontime_all AS my_db.ontime_local ENGINE = Distributed(perftest_3shards_1replicas, default, ontime_local, rand());
I tried this, and it doesn't seem to work.
2. If I drop the distributed table and create it again, how long clickhouse-server would pick up the changes?
For example, I changed Distributed table name from ontime_all to my_db.ontime_all, the change was picked up by the query very shortly. However, the ingestion only goes to the local table but not the remote. I waited for quite long time but I don't know if it would ever pick up.
Thanks!