Details
-
Type:
Task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: Optimizer
-
Labels:None
Description
Would it be possible to make DATE() on datetime column sargable in some cases?
Like rewrite "DATE(col) = const" to "col BETWEEN concat(const, ' 00:00:00') AND concat(const, ' 23:59:59')"
Other similar cases:
- "YEAR(col) = const" is almost the same
- "YEAR(col) = c1 AND MONTH(col) = c2" and other such combinations may be too complex to be worth it.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
any hints where to start looking in the code to implement this appreciated.