Querying a system table
Details about Cassandra database objects and cluster configuration in the system keyspace tables.
The system keyspace includes a number of tables that contain details about your Cassandra database objects and cluster configuration.
Cassandra 2.2 populates these tables and others in the system keyspace.
Table name | Column name | Comment |
---|---|---|
local | key, bootstrapped, broadcast_address, cluster_name, cql_version, data_center, gossip_generation, host_id, native_protocol_version, partitioner, rack, release_version, rpc_address, schema_version, thrift_version, tokens, truncated_at map | Information on a node has about itself and a superset of gossip. |
peers | peer, data_center, host_id, preferred_ip, rack, release_version, rpc_address, schema_version, tokens | Each node records what other nodes tell it about themselves over the gossip. |
schema_aggregates | keyspace_name, aggregate_name, signature, argument_types, final_func, initcond, return_type, state_func, state_type | Information about user-defined aggregates |
schema_columnfamilies | See comment. | Inspect schema_columnfamilies to get detailed information about specific tables. |
schema_columns | keyspace_name, columnfamily_name, column_name, component_index, index_name, index_options, index_type, validator | Information on columns and column indexes. Used internally for compound primary keys. |
schema_functions | keyspace_name, function_name, signature, argument_names, argument_types, body, called_on_null_input, language, return_type | Information on user-defined functions |
schema_keyspaces | keyspace_name, durable_writes, strategy_class, strategy_options | Information on keyspace strategy class and replication factor |
schema_usertypes | keyspace_name, type_name, field_names, field_types | Information about user-defined types |
Cassandra 3.0 populates these tables and others in the system keyspace.
Table name | Column name | Comment |
---|---|---|
available_ranges | keyspace_name, ranges | |
batches | id, mutations, version | |
batchlog | id, data, version, written_at | |
built_views | keyspace_name, view_name | Information on materialized views |
compaction_history | id, bytes_in, bytes_out, columnfamily_name, compacted_at, keyspace_name, rows_merged | Information on compaction history |
hints | target_id, hint_id, message_version, mutation | |
"IndexInfo" | table_name, index_name | Information on indexes |
local | key, bootstrapped, broadcast_address, cluster_name, cql_version, data_center, gossip_generation, host_id, listen_address, native_protocol_version, partitioner, rack, release_version, rpc_address, schema_version, thrift_version, tokens, truncated_at map | Information on a node has about itself and a superset of gossip. |
paxos | row_key, cf_id, in_progress_ballot, most_recent_commit, most_recent_commit_at, most_recent_commit_version, proposal, proposal_ballot, proposal_version | Information on lightweight Paxos transactions |
peers | peer, data_center, host_id, preferred_ip, rack, release_version, rpc_address, schema_version, tokens | Each node records what other nodes tell it about themselves over the gossip. |
peer_events | peer, hints_dropped | |
range_xfers | token_bytes,requested_at | |
size_estimates | keyspace_name, table_name, range_start, range_end, mean_partition_size, partitions_count | Information on partitions |
sstable_activity | keyspace_name, columnfamily_name, generation, rate_120m, rate_15m | |
views_builds_in_progress | keyspace_name, view_name, generation_number, last_token |
Cassandra 3.0 populates these tables in the system_schema keyspace.
Table name | Column name | Comment |
---|---|---|
aggregates | keyspace_name, aggregate_name, argument_types, final_func, initcond, return_type, state_func, state_type | Information about user-defined aggregates |
columns | keyspace_name, table_name, column_name, clustering_order, column_name_bytes, kind, position, type | Information about table columns |
dropped_columns | keyspace_name, table_name, column_name, dropped_time,type | Information about dropped columns |
functions | keyspace_name, function_name, argument_types, argument_names, body, called_on_null_input,language,return_type | Information on user-defined functions |
indexes | keyspace_name, table_name, index_name, kind,options | Information about indexes |
keyspaces | keyspace_name, durable_writes, replication | Information on keyspace durable writes and replication |
tables | keyspace_name, table_name, bloom_filter_fp_chance, caching, comment, compaction, compression, crc_check_chance, dclocal_read_repair_chance, default_time_to_live, extensions, flags, gc_grace_seconds, id, max_index_interval, memtable_flush_period_in_ms, min_index_interval, read_repair_chance, speculative_retry | Information on columns and column indexes. Used internally for compound primary keys. |
triggers | keyspace_name, table_name, trigger_name, options | Information on triggers |
types | keyspace_name, type_name, field_names, field_types | Information about user-defined types |
views | keyspace_name, view_name, base_table_id, base_table_name, bloom_filter_fp_chance, caching, comment, compaction, compression, crc_check_chance, dclocal_read_repair_chance, default_time_to_live, extensions, flags,gc_grace_seconds, include_all_columns, max_index_interval, memtable_flush_period_in_ms, min_index_interval, read_repair_chance, speculative_retry, where_clause | Information about materialized views |