Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.

Optimize DAG request TypeTableScan executor. #195

Open
Novemser opened this issue Dec 13, 2017 · 0 comments
Open

Optimize DAG request TypeTableScan executor. #195

Novemser opened this issue Dec 13, 2017 · 0 comments
Assignees

Comments

@Novemser
Copy link
Contributor

In some cases, TypeTableScan executor doesn't need to push down all the columns.

Like this, we only need to push down some of the columns for this request.

executors {
  tp: TypeTableScan
  tbl_scan {
    table_id: 363
    columns {
      column_id: 1
      tp: 3
      collation: 63
      columnLen: 11
      decimal: 0
      flag: 4227
      pk_handle: true
    }
    columns {
      column_id: 2
      tp: 15
      collation: 83
      columnLen: 45
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 3
      tp: 12
      collation: 63
      columnLen: 19
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 4
      tp: 252
      collation: 63
      columnLen: 65535
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 5
      tp: 254
      collation: 63
      columnLen: 2
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 6
      tp: 10
      collation: 63
      columnLen: 10
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 7
      tp: 7
      collation: 63
      columnLen: 19
      decimal: 0
      flag: 1153
      pk_handle: false
    }
    columns {
      column_id: 8
      tp: 13
      collation: 63
      columnLen: 4
      decimal: 0
      flag: 96
      pk_handle: false
    }
    columns {
      column_id: 9
      tp: 8
      collation: 63
      columnLen: 20
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 10
      tp: 246
      collation: 63
      columnLen: 11
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 11
      tp: 5
      collation: 63
      columnLen: 22
      decimal: -1
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 12
      tp: 4
      collation: 63
      columnLen: 12
      decimal: -1
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 13
      tp: 3
      collation: 63
      columnLen: 11
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 14
      tp: 9
      collation: 63
      columnLen: 9
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 15
      tp: 5
      collation: 63
      columnLen: 22
      decimal: -1
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 16
      tp: 2
      collation: 63
      columnLen: 6
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 17
      tp: 1
      collation: 63
      columnLen: 4
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 18
      tp: 254
      collation: 83
      columnLen: 10
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 19
      tp: 15
      collation: 83
      columnLen: 40
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 20
      tp: 251
      collation: 83
      columnLen: -1
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 21
      tp: 250
      collation: 83
      columnLen: 16777215
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 22
      tp: 252
      collation: 83
      columnLen: 65535
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 23
      tp: 249
      collation: 83
      columnLen: 255
      decimal: 0
      flag: 0
      pk_handle: false
    }
    columns {
      column_id: 24
      tp: 16
      collation: 63
      columnLen: 1
      decimal: 0
      flag: 32
      pk_handle: false
    }
    columns {
      column_id: 25
      tp: 11
      collation: 63
      columnLen: 10
      decimal: 0
      flag: 128
      pk_handle: false
    }
    columns {
      column_id: 26
      tp: 247
      collation: 83
      columnLen: -1
      decimal: 0
      flag: 0
      elems: "1"
      elems: "2"
      elems: "3"
      elems: "4"
      pk_handle: false
    }
    columns {
      column_id: 27
      tp: 248
      collation: 83
      columnLen: -1
      decimal: 0
      flag: 0
      elems: "a"
      elems: "b"
      elems: "c"
      elems: "d"
      pk_handle: false
    }
  }
}
executors {
  tp: TypeSelection
  selection {
    conditions {
      tp: ScalarFunc
      children {
        tp: ScalarFunc
        children {
          tp: ColumnRef
          val: "\200\000\000\000\000\000\000\005"
        }
        sig: TimeIsNull
        field_type {
          tp: 2
        }
      }
      sig: UnaryNot
      field_type {
        tp: 2
      }
    }
  }
}
time_zone_offset: 0
flags: 0
output_offsets: 5
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant