[
https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17767906#comment-17767906
]
Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 9:10 AM:
------------------------------------------------------------------------
This patch prints elapsed times to everything (1) when --debug is specified
with cqlsh:
{code:java}
cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1,
'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH;
(3ms elapsed)
cassandra@cqlsh> DROP KEYSPACE ks2 ;
(525ms elapsed)
cassandra@cqlsh> SELECT * from system_views.queries ;
thread_id | queued_micros | running_micros | task
-----------+---------------+----------------+------
(0 rows)
(4ms elapsed)
{code}
I would personally hide this behind a flag in cqlshrc option. It could be also
activated automatically if cqlsh is executed with "--debug" flag (which
already exists) as the patch below shows
(1)
[https://github.com/instaclustr/cassandra/commit/4c3ec54ddefb34f6a5fcb6df0ad45c4ac95bdedb]
was (Author: smiklosovic):
This patch prints elapsed times to everything (1)
{code}
cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1,
'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH;
(3ms elapsed)
cassandra@cqlsh> DROP KEYSPACE ks2 ;
(525ms elapsed)
cassandra@cqlsh> SELECT * from system_views.queries ;
thread_id | queued_micros | running_micros | task
-----------+---------------+----------------+------
(0 rows)
(4ms elapsed)
{code}
I would personally hide this behind a flag in cqlshrc option. It could be also
activated automatically if cqlsh is executed with "--debug" flag (which already
exists).
(1)
https://github.com/instaclustr/cassandra/commit/c4911edeaa769849e1f1dff8dcd33a6784c26310
> add time elapsed for simple CQL statement in the cql shell
> ----------------------------------------------------------
>
> Key: CASSANDRA-18861
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18861
> Project: Cassandra
> Issue Type: Improvement
> Components: CQL/Semantics
> Reporter: Ling Mao
> Assignee: Ling Mao
> Priority: Normal
> Fix For: 5.x
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]