Skip to content

Instantly share code, notes, and snippets.

//Create Keyspace//
CREATE KEYSPACE petclinic WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : '3'};
//Describe Keyspace//
DESCRIBE KEYSPACE petclinic;
USE petclinic;
//Create 3 Tables//
*// Create Keyspace*
CREATE KEYSPACE superheros WITH replication = {'class':'SimpleStrategy', 'replication_factor' : '3'};
*// Create Table with Simple Primary Key*
CREATE TABLE superheros.human_resources (
superhero_id uuid PRIMARY KEY,
addr1 text,
addr2 text,
city text,
@tomer-sandler
tomer-sandler / efficient_full_table_scan.py
Created March 2, 2017 20:30
Efficient Full Table Scan using ScyllaDB 1.6
## THIS SCRIPT ASSUMES USING A SINGLE CLIENT TO RUN THE FULL TABLE SCAN ##
## Prerequisite: cassandra-driver installed (sudo pip install cassandra-driver) ##
from multiprocessing.pool import ThreadPool
from cassandra.cluster import Cluster
#Your Scylla cluster setup#
NODES_IN_CLUSTER = 3
CORES_IN_NODE = 8
SMUDGE_FACTOR = 3