For some reason the doc entry for large_partitions was outdated. It contained incorrect ORDERING information and wrong usage example, since large_partitions' schema changed multiple times during the reviewing process. Message-Id: <1910f270419536ebccffde163ec1bfc67d273306.1533128957.git.sarna@scylladb. com>
863 B
863 B
System keyspace layout
This section describes layouts and usage of system.* tables.
system.large_partitions
Large partition table can be used to trace largest partitions in a cluster.
Schema:
CREATE TABLE system.large_partitions (
keyspace_name text,
table_name text,
sstable_name text,
partition_size bigint,
partition_key text,
compaction_time timestamp,
PRIMARY KEY ((keyspace_name, table_name), sstable_name, partition_size, partition_key)
) WITH CLUSTERING ORDER BY (sstable_name ASC, partition_size DESC, partition_key ASC);
Example usage
Extracting large partitions info
SELECT * FROM system.large_partitions;
Extracting large partitions info for a single table
SELECT * FROM system.large_partitions WHERE keyspace_name = 'ks1' and table_name = 'standard1';