Will Briggs01/22/2021, 4:56 PM
This one uses the star tree:
SELECT dimension, SUM(metric) AS totalMetrics FROM myTable WHERE otherDimension='filterValue' AND eventTimestamp >= cast(now() - 172800000 as long) GROUP BY 1 ORDER BY 2 DESC LIMIT 10
It looks like the use of a dynamically-computed timestamp value is confusing the optimizer somehow? the
SELECT dimension, SUM(metric) AS totalMetrics FROM myTable WHERE otherDimension='filterValue' AND eventTimestamp >= 1611161288000 GROUP BY 1 ORDER BY 2 DESC LIMIT 10
column is not part of my star-tree index in either case.
Will Briggs01/22/2021, 5:31 PM
. You can file an issue for the same.
cast(now() - 172800000 as long)
Will Briggs01/22/2021, 6:03 PM
Will Briggs01/22/2021, 6:16 PM
, and not in
is the high level entry point for you to get the algorithm. The code that passes the predicateColumns is the one that needs to be checked.
Will Briggs01/22/2021, 6:18 PM
Will Briggs01/22/2021, 6:20 PM
Will Briggs01/22/2021, 6:30 PM
Will Briggs01/22/2021, 8:36 PM
Jackie01/22/2021, 8:41 PM
is in micros instead of millis
I did a simple test to compile the query to BrokerRequest, and do see cast(now() - 172800000 as long) as LHS for predicate. My test did not actually go through any query execution.
Will Briggs01/22/2021, 8:43 PM
Jackie01/22/2021, 8:45 PM
Jackie01/22/2021, 8:55 PM
Will Briggs01/22/2021, 8:56 PM
Will Briggs01/22/2021, 8:57 PM
Jackie01/22/2021, 9:03 PM
Will Briggs01/22/2021, 9:03 PM
(or thereabouts) that is reifying eligible expressions into constants (e.g.,
) before handing the query off from the Broker for execution, and it isn’t handling
Jackie01/22/2021, 9:04 PM