Key CQL features

About the release of CQL 3.

CQL 3, which was previewed in Beta form in Cassandra 1.1, has been released in Cassandra 1.2. CQL 3 is now the default mode for cqlsh. CQL 3 supports schema that map Cassandra storage engine cells to a more powerful and natural row-column representation than earlier CQL versions and the Thrift API. CQL3 transposes data partitions into familiar row-based resultsets, dramatically simplifying data modeling. New features in Cassandra 1.2 include:

  • Collections.

    Collections provide easier methods for inserting and manipulating data that consists of multiple items that you want to store in a single column; for example, multiple email addresses for a single employee. There are three different types of collections: set, list, and map. Common tasks that required creating a multiple columns or a separate table can now be accomplished intuitively using a single collection.

  • Query profiling/request tracing.

    This cqlsh feature includes performance diagnostic utilities aimed at helping you understand, diagnose, and troubleshoot CQL statements sent to a Cassandra cluster. You can interrogate individual CQL statements in an ad-hoc manner, or perform a system-wide collection of all queries/commands sent to a cluster. The new nodetool utility adds probabilistic tracing for collecting all statements sent to a database to isolate and tune most resource intensive statements.

  • System information.

    You can easily retrieve details about your cluster configuration and database objects by querying tables in the system keyspace using CQL.

  • Atomic batches.

    Prior versions of Cassandra allowed for batch operations for grouping related updates into a single statement. If some of the replicas for the batch failed mid-operation, the coordinator would hint those rows automatically. However, if the coordinator itself failed in mid operation, you could end up with partially applied batches. In version 1.2 of Cassandra, batch operations are guaranteed by default to be atomic, and are handled differently than in earlier versions of the database.

  • Flat file loader/export utility.

    A new cqlsh utility facilitates importing and exporting flat file data to/from Cassandra tables. Although initially introduced in Cassandra 1.1.3, the new load utility wasn’t formally announced until now. The utility mirrors the COPY command from the PostgreSQL RDBMS. A variety of file formats are supported including comma-separated value (CSV), tab-delimited, and more, with CSV being the default.