Last active
September 17, 2015 07:09
-
-
Save belliottsmith/a28bd811309191195338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Command line suggestions | |
# user | |
# ops(insert=100,latest=100,point=10,range=1) | |
# n=1B | |
# -rate threads=50 | |
# -pop seq=1..1M | |
# contents=SORTED | |
# read-lookback=uniform(1..1M) | |
# -insert visits=fixed(100K) | |
# revisit=uniform(1..1M)" | |
# Variations to try: | |
# Increased RF | |
# compaction strategies; | |
# ASC order by | |
# Different operation distributions | |
keyspace: findata | |
keyspace_definition: | | |
CREATE KEYSPACE findata WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; | |
table: trades | |
table_definition: | | |
CREATE TABLE trades ( | |
instrumentid uuid, | |
day int, | |
second int, | |
millisecond int, | |
price double , | |
volume double, | |
PRIMARY KEY((instrumentid, day), second, millisecond) | |
) | |
WITH CLUSTERING ORDER BY (second DESC, millisecond DESC) | |
AND compaction = { 'class':'LeveledCompactionStrategy' }; | |
columnspec: | |
- name: second | |
cluster: uniform(50..200) | |
- name: millisecond | |
cluster: uniform(50..200) | |
queries: | |
latest: | |
cql: select * from trades where instrumentid = ? and day = ? ORDER BY second DESC, millisecond DESC LIMIT 1 | |
fields: samerow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) | |
point: | |
cql: select * from trades where instrumentid = ? and day = ? and second = ? ORDER BY second DESC, millisecond DESC LIMIT 1 | |
fields: samerow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) | |
range: | |
cql: select * from trades where instrumentid = ? and day = ? and second > ? ORDER BY second DESC, millisecond DESC LIMIT 100 | |
fields: samerow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment