Search This Blog

Showing posts with label CQL. Show all posts
Showing posts with label CQL. Show all posts

06 September, 2015

Cassandra cqlsh queries

Below are the commands useful for querying the cassandra database .
These are executed by logging into the Cassandra command line interface(CLI), CQLSH

1) showing the keyspaces(or databases )

describe keyspaces;

2)
Showing Tables in the keyspace(or database)

2.1. use <keyspace_name>;

2.2 describe tables;  this will show the tables in the keyspace(database)

3) Creating Index to an Exiting table with column

 CREATE INDEX tripid_idx ON table_4(tripid);


4) To show TABLE info using cqlsh
        DESC TABLE table_1 ;

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...