[ 
https://issues.apache.org/jira/browse/ASTERIXDB-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay Sarathy reassigned ASTERIXDB-3427:
----------------------------------------

    Assignee: Vijay Sarathy

> CBO not picking array index
> ---------------------------
>
>                 Key: ASTERIXDB-3427
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3427
>             Project: Apache AsterixDB
>          Issue Type: Test
>            Reporter: Vijay Sarathy
>            Assignee: Vijay Sarathy
>            Priority: Major
>
> For the following CH2 query, CBO picks the array index on ol_delivery_d 
> correctly. The plan with the index is faster than the non-index plan.
> {code:java}
> SELECT count(*)
> FROM   orders o, o.o_orderline ol
> WHERE  ol.ol_delivery_d  >= '2016-01-01 00:00:00.000000'
>   AND  ol.ol_delivery_d < '2017-01-01 00:00:00.000000';
> {code}
> However, in the presence of an additional predicate, CBO does not pick the 
> array index even though the index plan runs faster than the non-index plan.
> {code:java}
> SELECT count(*)
> FROM   orders o, o.o_orderline ol
> WHERE  ol.ol_delivery_d  >= '2016-01-01 00:00:00.000000'
>   AND  ol.ol_delivery_d < '2017-01-01 00:00:00.000000' and  ol.ol_amount > 
> 600;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to