Eric Ipsum
Eric Ipsum

Reputation: 745

Cassandra query tracing result reading

I am trying to measure the query execution time for comparison purpose with other sql and NoSQL databases. For this, i have used tracing on command, but can't understand which is the query execution time. I can't find exact information on internet. For table creation, i am using query:

   Tracing on;
   CREATE TABLE statistics(country_name text, dt date, confirmed_cases bigint, deaths bigint, 
   PRIMARY KEY(country_name, deaths))with clustering order by (deaths DESC);

cqlsh is showing the result like this:

left center right
One Two Three
   |activity| timestamp | source | source_elapsed | client |                                                                                                                                                                              
   |:---- |:------:| -----:| -----:|
                                                                                                                                                                      
   |Execute CQL3 query | 2022-05-10 10:38:06.084000 | 172.24.2.2 | 0 | 
   41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0
   |Parsing CREATE TABLE statistics(country_name text, dt date, confirmed_cases bigint, deaths  
   bigint, PRIMARY KEY(country_name, deaths))with clustering order by (deaths DESC); 
   [CoreThread-6] | 2022-05-10 10:38:06.085000 | 172.24.2.2 | 254 | 
   41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0                                                                                                                                                
   |Preparing statement [CoreThread-6] | 2022-05-10 10:38:06.085000 | 172.24.2.2 |            
   457 | 41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0                                                                                                                                    
   Adding to tables memtable [SchemaUpdatesStage:1] | 2022-05-10 10:38:06.092000 | 172.24.2.2 
   | 8175 | 41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0                                                                                                                                   
   Adding to keyspaces memtable [SchemaUpdatesStage:1] | 2022-05-10 10:38:06.092000 | 
   172.24.2.2 |  8244 | 41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0                                                                                                                                     
   Adding to columns memtable [SchemaUpdatesStage:1] | 2022-05-10 10:38:06.092000 | 172.24.2.2 
  |8320 | 41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0                                                                                                                                                                   
  Request complete | 2022-05-10 10:38:06.141445 | 172.24.2.2 | 57445 | 
  41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0

So which one is the actual time for execution of table creation query? i also need to trace execution time for insert query and retrieval of highest value of a column by partition. Please help!

Upvotes: 1

Views: 298

Answers (1)

Adelino Silva
Adelino Silva

Reputation: 930

Note: The source_elapsed column value is the elapsed time of the event on the source node in microseconds. source_elapsed is the cumulative execution time on a specific node

"Request complete | 2022-05-10 10:38:06.141445 | 172.24.2.2 | 57445 | 41e1:cbdc:b845:42f6:aa06:27ea:d549:3af0"

Upvotes: 1

Related Questions