Can the ORDER BY columns be in different order on two different replicas ?
say I want to have sorting key for a replicated table on server 1 as :
ORDER BY (CounterID, EventDate)
while on server 2 as
ORDER BY (EventDate, CounterID)
rest of the schema is same.
Replicated*MergeTree -- No.
You can use smaller partitions (partition by daily). In this case [where EventDate = ] will scan only one partition.
You can create a materialized view with a different sorting/primary key if that is required.
It is possible if you use independent MergeTree tables and Distributed table just looks at them as replicas. For data replication, you can INSERT into Distributed table (cluster should has internal_replication set to false) or INSERT data to both replicas directly. Data consistency between replicas will not be maintained.
Most helpful comment
You can create a materialized view with a different sorting/primary key if that is required.