You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Vijay Sarathy (Jira)" <ji...@apache.org> on 2024/06/11 19:27:00 UTC
[jira] [Created] (ASTERIXDB-3427) CBO not picking array index
Vijay Sarathy created ASTERIXDB-3427:
----------------------------------------
Summary: 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
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)