Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Apache Cassandra - Second Edition

You're reading from   Mastering Apache Cassandra - Second Edition Build, manage, and configure high-performing, reliable NoSQL database for your application with Cassandra

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher Packt
ISBN-13 9781784392611
Length 350 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

CQL shell commands

CQL shell or cqlsh comes with many little utilities. In this section, we will see them.

DESCRIBE

The DESCRIBE command is used to get details of container objects. You can use DESC in place of DESCRIBE. So, one can describe a keyspace, table, or cluster. There are five variants of this command:

# Describe the whole cluster
DESCRIBE CLUSTER
# Display the CQL command to regenerate all the keyspaces in the cluster
DESCRIBE SCHEMA
# List all the keyspaces names
DESCRIBE KEYSPACES
# List the CQL statement that can be used to recreate the keyspace
DESCRIBE KEYSPACE <keyspace_name>
# Show tables names in the current keyspace
# Show all the tables across all the keyspaces if not using any keyspace
DESCRIBE TABLES
# Print CQL to create a table
DESCRIBE TABLE <table_name>

TRACING

The TRACING command is a convenient tool to view the steps that your queries go through and possibly use it to optimize the query. It displays how much time is spent on what step at which node.

Use...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime