Open
Description
During internal discussion, we concluded that drivers unnecessarily executes SELECT schema_version FROM system.local WHERE key='local'
query on all connections when it awaits schema agreement. Each table (including system tables) is defined "per-node" and all shards read from it.
There is a room for optimization - we can execute the query on just one connection to the specific node.
Part of the discussion for reference:
Analogously, when driver checks for schema agreement, it executes SELECT schema_version FROM system.local WHERE key='local' on each shard and checks if queried schema_versions match.
This is obviously inefficient, there is only one scylla.local table per node, and all shards read from it.