[ 
https://issues.apache.org/jira/browse/CASSANDRA-6477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14347226#comment-14347226
 ] 

Carl Yeksigian commented on CASSANDRA-6477:
-------------------------------------------

The work I have so far is on [this 
branch|https://github.com/carlyeks/cassandra/tree/ticket/6477-poc]; dtests are 
[here|https://github.com/carlyeks/cassandra-dtest/tree/6477].

Syntax for creating a global index:
{noformat}
CREATE GLOBAL INDEX ON foo (bar) DENORMALIZED (baz)
{noformat}

A query against {{foo}} can now also be against {{bar}}, just like a normal 2i 
query would. Internally, that is translated into a new query on the index 
table. Only denormalized values can currently be selected.

Things still left to do before this is ready:
* When creating an index, need to build the index from the existing data.
  This is going to be very similar to CASSANDRA-8234
* DeletionInfo are not handled
  This involves reading out all of the data which is going to be deleted and 
created tombstones for the index
* Collections, TTL’d columns are not handled
* Denormalizing all the columns ({{DENORMALIZED (\*)}})
  This is in the spec, but hasn't been implemented yet

Right now, it is being handled in SP.mutateWithTriggers, instead of doing this 
in Mutation.apply. This was mainly so that the global index update code is 
separate from the rest of the write path, hopefully making it more concise and 
preventing interference with the write path when not in use.

> Global indexes
> --------------
>
>                 Key: CASSANDRA-6477
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Carl Yeksigian
>              Labels: cql
>             Fix For: 3.0
>
>
> Local indexes are suitable for low-cardinality data, where spreading the 
> index across the cluster is a Good Thing.  However, for high-cardinality 
> data, local indexes require querying most nodes in the cluster even if only a 
> handful of rows is returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to