1. 11 7月, 2017 5 次提交
  2. 10 7月, 2017 23 次提交
  3. 09 7月, 2017 4 次提交
    • A
      Update IFunction.h · 894d09f7
      alexey-milovidov 提交于
      894d09f7
    • M
      PKCondition: infer index use with pk subexpression · ff733941
      Marek Vavruša 提交于
      By default only constraints explicitly matching
      primary key expression (or expression wrapped in
      a monotonic function) are eligible for part and
      range selection. So for example, if index is:
      
      (toStartOfHour(dt), UserID)
      
      Then a query such as this resorts to full scan:
      
      SELECT count() FROM t WHERE dt = now()
      
      Intuitively, only parts with toStartOfHour(now())
      could be selected, but it is less trivial to prove.
      The primary key currently can be wrapped in a chain
      of monotonic functions, so following would work:
      
      toStartOfHour(dt) = toStartOfHour(now()) AND dt = now()
      
      It must be however explicitly stated, if we wanted
      to infer that we’d have to know the inverse function,
      and prove that the inverse function is monotonic
      on given interval. This is not practical as
      there is no inverse function that for example undos
      rounding, it isn’t strictly monotonic.
      
      There are however functions that don’t transform
      output range and preserve monotonicity on the
      complete input range, such as rounding or casts
      to a same or wider numeric type. This eliminates
      the need to find inverse function, as no check for monotonicity over arbitrary interval is needed,
      and thus makes this optimisation possible.
      ff733941
    • V
    • A
      Style [#CLICKHOUSE-2]. · 4b31fd9a
      Alexey Milovidov 提交于
      4b31fd9a
  4. 08 7月, 2017 3 次提交
  5. 07 7月, 2017 1 次提交
  6. 06 7月, 2017 4 次提交