Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 元のクエリ
- col1 < 100 OR col2 is TRUE AND TD_TIME_RANGE(time, '2015-11-01')
- -- 上のクエリは AND が優先的に考慮されるため, 以下のクエリと同義になります。
- -- OR によって左右に分解されたこのクエリでは, TD_TIME_RANGE があるにも関わらず, (col1 < 100) の判定のために全件スキャンになります!
- (col1 < 100) OR (col2 is TRUE AND TD_TIME_RANGE(time, '2015-11-01'))
- -- クエリ全体に TIME_RANGE 制約を利かす場合は明示的に () を使いましょう!
- -- 以下のクエリでは TIME_RANGE 制約内のデータセットで (col1 < 100 OR col2 is TRUE) が判定されます。
- (col1 < 100 OR col2 is TRUE) AND TD_TIME_RANGE(time, '2015-11-01')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement