diff --git a/CHANGES.txt b/CHANGES.txt index 71d5a2db6c..d8b83bf4ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,7 @@ * Populate TokenMetadata early during startup (CASSANDRA-9317) * Undeprecate cache recentHitRate (CASSANDRA-6591) * Add support for selectively varint encoding fields (CASSANDRA-9499, 9865) + * Materialized Views (CASSANDRA-6477) 2.2.1 diff --git a/NEWS.txt b/NEWS.txt index ba81d6e15b..392a5815d8 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -16,8 +16,18 @@ using the provided 'sstableupgrade' tool. 3.0 === +New features +------------ + - Materialized Views, which allow for server-side denormalization, is now + available. Materialized views provide an alternative to secondary indexes + for non-primary key queries, and perform much better for indexing high + cardinality columns. + See http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views + Upgrading --------- + - New write stages have been added for batchlog and materialized view mutations + you can set their size in cassandra.yaml - User defined functions are now executed in a sandbox. To use UDFs and UDAs, you have to enable them in cassandra.yaml. - New SSTable version 'la' with improved bloom-filter false-positive handling diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml index 7ce36af0ac..0e200955a4 100644 --- a/conf/cassandra.yaml +++ b/conf/cassandra.yaml @@ -342,6 +342,11 @@ seed_provider: concurrent_reads: 32 concurrent_writes: 32 concurrent_counter_writes: 32 +concurrent_batchlog_writes: 32 + +# For materialized view writes, as there is a read involved, so this should +# be limited by the less of concurrent reads or concurrent writes. +concurrent_materialized_view_writes: 32 # Maximum memory to use for pooling sstable buffers. Defaults to the smaller # of 1/4 of heap or 512MB. This pool is allocated off-heap, so is in addition diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index bc7c385feb..d5c5684358 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -479,6 +479,61 @@ The @DROP INDEX@ statement is used to drop an existing secondary index. The argu If the index does not exists, the statement will return an error, unless @IF EXISTS@ is used in which case the operation is a no-op. + +h3(#createMVStmt). CREATE MATERIALIZED VIEW + +__Syntax:__ + +bc(syntax).. + ::= CREATE MATERIALIZED VIEW ( IF NOT EXISTS )? AS + SELECT ( '(' ( ',' ) * ')' | '*' ) + FROM + WHERE ( IS NOT NULL ( AND IS NOT NULL )* )? + PRIMARY KEY '(' ( ',' )* ')' + ( WITH