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

Sylvain Lebresne commented on CASSANDRA-6477:
---------------------------------------------

bq. I'm still not sure how handling a null partition key would work though in 
term of tokens. If you have a sparse column across millions of rows in the base 
table you would end up with a HUGE hotspot since all NULL keys would end up on 
the same partition (token X)

We're saying it could work technically. Your point that it may not be a good 
idea is valid, but I could argue that creating hotspots by choosing poor 
partition keys is possible with or without nulls. Creating a MV where the 
partition key is for instance the gender of your users is equally going to 
create massive hotspots, but it's not like we can forbid people to do it (and 
if we were to somehow be able to enforce {{NOT NULL}} (which we can't) and 
force people to use it, you can be sure some people just end up using default 
values and thus generating the exact same problems. There is no such thing as 
stupid-proofing).

If we fear nulls make it easier to shoot yourself in the foot, then maybe we 
can find some kind of limitation that are not too restrictive but make that 
shoot-footing less likely, but I suspect we'll just have to rely on having good 
best practice docs.

> Materialized Views (was: 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 beta 1
>
>         Attachments: test-view-data.sh, users.yaml
>
>
> 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