Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-745

Why isn't my query doing a RANGE SCAN?

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Resolution: Fixed
    • None
    • None
    • None
    • 614

    Description

      This is my DDL:

      CREATE TABLE IF NOT EXISTS myTable (
      d DATE NOT NULL,
      o BIGINT NOT NULL,
      l UNSIGNED_TINYINT NOT NULL,
      s UNSIGNED_TINYINT NOT NULL,
      r UNSIGNED_TINYINT NOT NULL,
      c BINARY(16) NOT NULL,
      t BINARY(16) NOT NULL,
      m BINARY(16) NOT NULL,
      k BINARY(16) NOT NULL,
      e VARCHAR NOT NULL,
      i VARCHAR NULL,
      q BINARY(16) NULL
      CONSTRAINT pk PRIMARY KEY (d DESC, o DESC, l, s, r, c, t, m, k)) IMMUTABLE_ROWS=true

      This is my query:

      explain select * from myTable where c=1 and t=3;

      And this is my result:

      ------------

      PLAN

      ------------

      CLIENT PARALLEL 1-WAY FULL SCAN OVER myTable
      SERVER FILTER BY (C = [B@4ad9da94 AND T = [B@249d50f0)

      ------------

      This is my expectation of a result:

      ------------

      PLAN

      ------------

      DEGENERATE SCAN OVER <myTable_pk_index>

      ------------

      When I try to select something, I've got a "FULL SCAN" instead of "DEGENERATE SCAN". Is it my mistake? Or a bug?

      Attachments

        Activity

          People

            Unassigned Unassigned
            dsalychev Dmitry Salychev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: