Introduction to Cassandra Query Language

Cassandra Query Language (CQL) is a query language for the Apache Cassandra database.

The Cassandra Query Language (CQL) is the primary language for communicating with the Apache Cassandra database. The most basic way to interact with Apache Cassandra is using the CQL shell, cqlsh. Using cqlsh, you can create keyspaces and tables, insert and query tables, plus much more. If you prefer a graphical tool, you can use DataStax DevCenter. For production, DataStax supplies a number drivers so that CQL statements can be passed from client to cluster and back.

Important: This document assumes you are familiar with either the Apache Cassandra 2.1.

CQL new features for Cassandra 2.1

Cassandra 2.1 new CQL features include:
The cqlsh utility also has been improved:DataStax Java Driver 2.0.0 supports Cassandra 2.1 with limitations. This version of the driver is incompatible with the new features.
Other notable changes:
  • Cassandra rejects USING TIMESTAMP or USING TTL in the command to update a counter column, and now generates an error message when you attempt such an operation.
  • In Cassandra 2.1, the CQL table property index_interval is replaced by min_index_interval and max_index_interval. The max_index_interval is 2048 by default. The default would be reached only when SSTables are infrequently-read and the index summary memory pool is full. When upgrading from earlier releases, Cassandra uses the old index_interval value for the min_index_interval.