You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Carl Yeksigian (JIRA)" <ji...@apache.org> on 2016/02/17 22:23:18 UTC
[jira] [Commented] (CASSANDRA-11177) CQLSH causes slowdown when
creating table using multiline statement
[ https://issues.apache.org/jira/browse/CASSANDRA-11177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151215#comment-15151215 ]
Carl Yeksigian commented on CASSANDRA-11177:
--------------------------------------------
cqlsh is trying to provide completion info for the first create table command because of the tab character; this is what is causing the extreme slowdown. Removing the tab characters resulted in the same result as the one line query, and I can also reproduce the same performance if I try tab completion at the end of the one line query.
> CQLSH causes slowdown when creating table using multiline statement
> -------------------------------------------------------------------
>
> Key: CASSANDRA-11177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11177
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Environment: Centos 7, 16gb memory, 4 cores
> Reporter: Jim Wright
> Priority: Critical
> Labels: cqlsh
> Fix For: 3.x
>
> Attachments: mofaPqX.png
>
>
> I'm running a 3 node cluster, each with 4 cores and 16gb memory.
> When creating the following table (by copying and pasting into cqlsh) each line is pasted in one at a time, and the time between each line being pasted in seems to grow exponentially, especially once the counter columns were reached.
> {noformat}
> CREATE TABLE stats_by_site_tracking_hourly (
> d_tally text, -- 2016-02
> d_date timestamp, -- 2016-02-01 13
> site_id int,
> is_new_member int, -- 1/0
> device text, -- desktop/tablet/mobile/unknown
> tracking_medium text,
> tracking_source text,
> tracking_campaign text,
> tracking_term text,
> accepted counter,
> adjusted_accepted counter,
> rejected counter,
> adjusted_rejected counter,
> error counter,
> impressions_positive counter,
> adjusted_impressions_positive counter,
> impressions_negative counter,
> adjusted_impressions_negative counter,
> revenue counter,
> adjusted_revenue counter,
> reversals_rejected counter,
> reversals_revenue counter,
> PRIMARY KEY ((d_tally), site_id, d_date, is_new_member, device, tracking_medium, tracking_source, tracking_campaign, tracking_term)
> );
> {noformat}
> While I left the create table to run memory usage crept up to 70%, and CPU usage went up to 107%.
> I have attached a screenshot of what cqlsh looked like after ~20 minutes.
> I tried the query again but in 1 line (as below) and it executed instantly.
> {noformat}
> CREATE TABLE stats_by_site_tracking_hourly ( d_tally text, d_date timestamp, site_id int, is_new_member int, device text, tracking_medium text, tracking_source text, tracking_campaign text, tracking_term text, accepted counter, adjusted_accepted counter, rejected counter, adjusted_rejected counter, error counter, impressions_positive counter, adjusted_impressions_positive counter, impressions_negative counter, adjusted_impressions_negative counter, revenue counter, adjusted_revenue counter, reversals_rejected counter, reversals_revenue counter, PRIMARY KEY ((d_tally), site_id, d_date, is_new_member, device, tracking_medium, tracking_source, tracking_campaign, tracking_term) );
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)