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
import timeit | |
from cassandra.cluster import Cluster | |
cluster = Cluster() | |
session = cluster.connect() | |
session.execute("CREATE KEYSPACE IF NOT EXISTS demodb WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };"); | |
session.set_keyspace('demodb'); | |
session.execute("CREATE TABLE IF NOT EXISTS TMCR (p1 int, c1 int, r1 text, PRIMARY KEY (p1, c1));") |
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
category | position | name | price | |
----------+----------+----------------+------- | |
starters | 3 | taco the pulpo | 8 |
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
category | position | name | price | |
----------+----------+----------------+------- | |
starters | 3 | taco the pulpo | 8 |
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
category | position | name | price | |
----------+----------+-----------------+------- | |
soups | 1 | sour rye soup | 12 | |
soups | 2 | sorrel soup | 8 | |
soups | 3 | beef tripe soup | 11.2 |
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
category | position | name | price | |
----------+----------+----------------+------- | |
starters | 3 | taco the pulpo | 8 |
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
category | position | name | price | |
----------+----------+-----------------+------- | |
soups | 1 | sour rye soup | 12 | |
soups | 2 | sorrel soup | 8 | |
soups | 3 | beef tripe soup | 11.2 |
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
category | position | name | price | |
----------+----------+----------------+------- | |
soups | 2 | sorrel soup | 8 | |
starters | 2 | steak tartare | 9.5 | |
starters | 3 | taco the pulpo | 8 |
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
category | position | name | price | |
----------+----------+---------------+------- | |
soups | 1 | sour rye soup | 12 |
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
category | position | name | price | |
----------+----------+-----------+------- | |
starters | 1 | foie gras | 10.5 |
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
category | position | name | price | |
----------+----------+----------------+------- | |
starters | 2 | steak tartare | 9.5 | |
starters | 3 | taco the pulpo | 8 |
OlderNewer