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

Thorsten von Eicken commented on CASSANDRA-3761:
------------------------------------------------

In #CASSANDRA-2747 you said
bq. My current patch don't really allow creating a secondary index on a non 
static CF, because it's not clear how that would work from the syntax and I'm 
sure I see good use for that. Does that bother someone ?
The answer is "yes". Why? I'm finding it very useful to abuse the wide-row 
column names a little bit to be able to group rows and be able to operate on 
them in bulk. It's typically not in the frequent query path but required for 
management operations.

One example: a system that stores snippets from web server logs. Each snippet 
is a row, each line a column, the column names simple line numbers 1, 2, 3, ... 
The row key is a snippet id. Data is entered in real time and I need to purge 
old data after a certain retention period measured in days. To do that, I abuse 
column 0 to store the date and put an index on that. To remove data for a day I 
traverse this secondary index.

Second example: a multi-tenant system where the data has some wide rows. We 
need to extract a user's data for a variety of purposes, for example to migrate 
the data to a different cluster. We again abuse the column names a bit and add 
a user_id column with a secondary index.

Unless I completely misunderstood your statement above and these secondary 
indexes are possible in cql3, I suspect your answer will be to use a separate 
CF, but that does put a lot more burden on the app, the avoidance of which is 
one the big benefits of secondary indexes.
                
> CQL 3.0
> -------
>
>                 Key: CASSANDRA-3761
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3761
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Critical
>              Labels: cql
>             Fix For: 1.1
>
>         Attachments: 0001-CQL-3.0.patch, 
> 0002-Add-support-for-switching-the-CQL-version.patch, 
> 0003-Makes-batches-atomic.patch, 0004-Thrift-gen-files.patch, cql_tests.py, 
> create_cf_syntaxes.txt
>
>
> This ticket is a reformulation/generalization of CASSANDRA-2474. The core 
> change of CQL 3.0 is to introduce the new syntaxes that were discussed in 
> CASSANDRA-2474 that allow to:
> # Provide a better/more native support for wide rows, using the idea of 
> transposed vie.
> # The generalization to composite columns.
> The attached text file create_cf_syntaxes.txt recall the new syntaxes 
> introduced.
> The changes proposed above allow (and strongly suggest in some cases) a 
> number of other changes to the language that this ticket proposes to 
> explore/implement (more details coming in the comments).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to