From e3b810a8af910eee7171f533733a90ca9aa296f4 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Wed, 16 Aug 2017 11:12:43 -0700 Subject: [PATCH] Reorder key to enable tile/period range queries All columns on which we do point queries (e.g. pipelinekey, externalsourceid) should come before the columns on which we do range queries (e.g. tilex, periodstartdate). --- ops/storage-ddls/cassandra-setup.cql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ops/storage-ddls/cassandra-setup.cql b/ops/storage-ddls/cassandra-setup.cql index 760ba2cb..dc8bc6fc 100644 --- a/ops/storage-ddls/cassandra-setup.cql +++ b/ops/storage-ddls/cassandra-setup.cql @@ -171,7 +171,7 @@ CREATE TABLE computedtiles ( conjunctiontopic1 text, conjunctiontopic2 text, conjunctiontopic3 text, - PRIMARY KEY ((periodtype, conjunctiontopic1, conjunctiontopic2, conjunctiontopic3, tilez, period), tilex, tiley, periodstartdate, periodenddate, pipelinekey, externalsourceid) + PRIMARY KEY ((periodtype, conjunctiontopic1, conjunctiontopic2, conjunctiontopic3, tilez, period), pipelinekey, externalsourceid, tilex, tiley, periodstartdate, periodenddate) ); CREATE TABLE popularplaces (