You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ian Maxon (Jira)" <ji...@apache.org> on 2024/06/14 17:09:00 UTC
[jira] [Updated] (ASTERIXDB-3427) CBO not picking array index
[ https://issues.apache.org/jira/browse/ASTERIXDB-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Maxon updated ASTERIXDB-3427:
---------------------------------
Issue Type: Bug (was: Test)
> CBO not picking array index
> ---------------------------
>
> Key: ASTERIXDB-3427
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3427
> Project: Apache AsterixDB
> Issue Type: Bug
> 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)