[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768025#comment-17768025 ]
Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 1:57 PM: ------------------------------------------------------------------------ {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task -----------+---------------+----------------+------ (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task -----------+---------------+----------------+------ (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task -----------+---------------+----------------+------ (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. cc [~bschoeni] was (Author: smiklosovic): {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task -----------+---------------+----------------+------ (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task -----------+---------------+----------------+------ (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task -----------+---------------+----------------+------ (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. > 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: Low > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org