Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8E05190CA for ; Thu, 24 Mar 2016 14:00:29 +0000 (UTC) Received: (qmail 92078 invoked by uid 500); 24 Mar 2016 14:00:29 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 92006 invoked by uid 500); 24 Mar 2016 14:00:29 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 91790 invoked by uid 99); 24 Mar 2016 14:00:29 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2016 14:00:29 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 200C82C1F6E for ; Thu, 24 Mar 2016 14:00:29 +0000 (UTC) Date: Thu, 24 Mar 2016 14:00:29 +0000 (UTC) From: "Yasuharu Goto (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11425) Add prepared statement on Execute prepared query session trace. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15210265#comment-15210265 ] Yasuharu Goto commented on CASSANDRA-11425: ------------------------------------------- My patch is here. https://github.com/apache/cassandra/compare/trunk...matope:11425-trunk > Add prepared statement on Execute prepared query session trace. > --------------------------------------------------------------- > > Key: CASSANDRA-11425 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11425 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Reporter: Yasuharu Goto > Assignee: Yasuharu Goto > Priority: Minor > > For now, the system_traces.sessions rows for "Execute CQL3 prepared query" do not show us any information about the prepared query which is executed on the session. So we can't see what query is the session executing. > I think this makes performance tuning difficult on Cassandra. > So, In this ticket, I'd like to add the prepared query parameter on Execute session trace like this. > {noformat} > cqlsh:system_traces> select * from sessions ; > session_id | client | command | coordinator | duration | parameters | request | started_at > --------------------------------------+-----------+---------+-------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------+--------------------------------- > a001ec00-f1c5-11e5-b14a-6fe1292cf9f1 | 127.0.0.1 | QUERY | 127.0.0.1 | 666 | {'consistency_level': 'ONE', 'page_size': '5000', 'query': 'SELECT * FROM test.test2 WHERE id=? LIMIT 1', 'serial_consistency_level': 'SERIAL'} | Execute CQL3 prepared query | 2016-03-24 13:38:00.000000+0000 > a0019de0-f1c5-11e5-b14a-6fe1292cf9f1 | 127.0.0.1 | QUERY | 127.0.0.1 | 109 | {'query': 'SELECT * FROM test.test2 WHERE id=? LIMIT 1'} | Preparing CQL3 query | 2016-03-24 13:37:59.998000+0000 > a0014fc0-f1c5-11e5-b14a-6fe1292cf9f1 | 127.0.0.1 | QUERY | 127.0.0.1 | 126 | {'query': 'INSERT INTO test.test2(id,value) VALUES (?,?)'} | Preparing CQL3 query | 2016-03-24 13:37:59.996000+0000 > a0019de1-f1c5-11e5-b14a-6fe1292cf9f1 | 127.0.0.1 | QUERY | 127.0.0.1 | 764 | {'consistency_level': 'ONE', 'page_size': '5000', 'query': 'SELECT * FROM test.test2 WHERE id=? LIMIT 1', 'serial_consistency_level': 'SERIAL'} | Execute CQL3 prepared query | 2016-03-24 13:37:59.998000+0000 > a00176d0-f1c5-11e5-b14a-6fe1292cf9f1 | 127.0.0.1 | QUERY | 127.0.0.1 | 857 | {'consistency_level': 'QUORUM', 'page_size': '5000', 'query': 'INSERT INTO test.test2(id,value) VALUES (?,?)', 'serial_consistency_level': 'SERIAL'} | Execute CQL3 prepared query | 2016-03-24 13:37:59.997000+0000 > {noformat} > Now, "Execute CQL3 prepared query" session displays its query. > I believe that this additional information would help operators a lot. -- This message was sent by Atlassian JIRA (v6.3.4#6332)