卡桑德拉查询跟踪结果阅读

发布于 2025-01-28 03:13:55 字数 2988 浏览 3 评论 0原文

我正在尝试测量与其他SQL和NOSQL数据库的比较目的的查询执行时间。为此,我使用了命令上的跟踪,但无法理解哪个查询执行时间。我找不到互联网上的确切信息。对于表格创建,我正在使用查询:

   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显示这样的结果:

中心右中间
两个
   |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

,所以哪个是执行表创建查询的实际时间?我还需要跟踪执行时间以插入列插入列的最高值。请帮忙!

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:

leftcenterright
OneTwoThree
   |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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆蝶 2025-02-04 03:13:55

注意: source_elapsed 列值是微秒源节点上事件的经过的时间。
source_elapsed 是特定节点上的累积执行时间

请求完成 | 2022-05-10 10:38:38:06.141445 | 172.24.2.2 | 574445 |
41E1:CBDC:B845:42F6:AA06:27EA:D549:3AF0”

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"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文