What is database sharding?
Using the provided shard and workspace data, demonstrate how a sharded layout can be inspected by reporting utilization for every active shard. Include active shards with no assigned workspaces and exclude workspaces that are not assigned to a shard.
shard_id, shard_name, assigned_workspace_count, estimated_rows, and utilization_pctshard_id ascending| Column | Type | Description |
|---|---|---|
| shard_idPK | INT | Unique shard identifier |
| shard_name | VARCHAR(50) | Human-readable shard name |
| status | VARCHAR(20) | Shard lifecycle status |
| capacity_rows | INT | Estimated row capacity of the shard |
| Column | Type | Description |
|---|---|---|
| workspace_idPK | INT | Unique workspace identifier |
| workspace_name | VARCHAR(100) | Workspace name |
| shard_id | INT | Shard containing the workspace |
| estimated_rows | INT | Estimated number of rows belonging to the workspace |