Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11177

CQLSH causes slowdown when creating table using multiline statement

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Fix Version/s: 3.11.x
    • Component/s: Legacy/Tools
    • Labels:
    • Environment:

      Centos 7, 16gb memory, 4 cores

    • Severity:
      Low

      Description

      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.

      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)
      );
      

      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.

      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) );
      

        Attachments

        1. mofaPqX.png
          38 kB
          Jim Wright

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jmwri Jim Wright
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: