Skip to content

Instantly share code, notes, and snippets.

@thobbs
Last active December 14, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thobbs/5040362 to your computer and use it in GitHub Desktop.
Save thobbs/5040362 to your computer and use it in GitHub Desktop.
cqlsh> CREATE KEYSPACE keyspace1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1' };
cqlsh> use keyspace1;
cqlsh:keyspace1> CREATE TABLE cf3 ( key blob PRIMARY KEY, id varint, postcode text, price varint ) WITH COMPACT STORAGE;
cqlsh:keyspace1> CREATE INDEX cf3_id_idx ON cf3 (id) ;
cqlsh:keyspace1> CREATE INDEX cf3_price_idx ON cf3 (price) ;
cqlsh:keyspace1> DESCRIBE COLUMNFAMILY keyspace1.cf3;
CREATE TABLE cf3 (
key blob PRIMARY KEY,
id varint,
postcode text,
price varint
) WITH COMPACT STORAGE AND
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
CREATE INDEX cf3_id_idx ON cf3 (id);
CREATE INDEX cf3_price_idx ON cf3 (price);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment