Apache Cassandra 1.2 Documentation

CQL keyspace and table properties

The Cassandra 1.2 documentation is transitioning to a new format!
Please use the new Cassandra 1.2 documentation instead.
Back to Table of Contents
All Documents List     

The CQL WITH clause specifies keyspace and table properties in these CQL commands:

CQL keyspace properties

CQL supports setting the following keyspace properties.

CQL 3 table properties

CQL supports Cassandra table properties listed in the following table. The table includes the default value of the property. In CQL commands, such as CREATE TABLE, you format properties in either the name-value pair or collection map format.

The name-value pair property syntax is:

name = value AND name = value

The collection map format is:

{ name : value, name, value : name, value ... }

See CREATE TABLE for examples.

CQL Property Name Format
bloom_filter_fp_chance name: value
caching name: value
comment name: value
compaction map
compression map
dclocal_read_repair_chance name: value
gc_grace_seconds name: value
read_repair_chance name: value
replicate_on_write name: value

CQL comments

Comments can be used to document CQL statements in your application code. Single line comments can begin with a double dash (--) or a double slash (//) and extend to the end of the line. Multi-line comments can be enclosed in /* and */ characters.

CQL 3 subproperties of compaction

Using CQL, you can configure compaction for a table by constructing a map of the compaction property and the following subproperties:

CQL Compaction Subproperties Name Supported Strategy
bucket_high SizeTieredCompactionStrategy
bucket_low SizeTieredCompactionStrategy
max_threshold SizeTieredCompactionStrategy
min_threshold SizeTieredCompactionStrategy
min_sstable_size SizeTieredCompactionStrategy
sstable_size_in_mb LeveledCompactionStrategy
tombstone_compaction_interval all
tombstone_threshold all

CQL 3 subproperties of compression

Using CQL, you can configure compression for a table by constructing a map of the compression property and the following subproperties:

To query the Cassandra database, use CQL commands described in the next section.