You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/09/25 16:10:00 UTC

[jira] [Commented] (ASTERIXDB-3209) CBO Not Picking Up Index (for Equality Pred)

    [ https://issues.apache.org/jira/browse/ASTERIXDB-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768764#comment-17768764 ] 

ASF subversion and git services commented on ASTERIXDB-3209:
------------------------------------------------------------

Commit 15f18750da47db05dc704a9e1ca75f5fa287c163 in asterixdb's branch refs/heads/master from Vijay Sarathy
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=15f18750da ]

[ASTERIXDB-3209][COMP] CBO Not Picking Up Index (for Equality Pred)

Change-Id: I818171a2f381c941fb336f5c5c9cb2a03d2af70c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17800
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Vijay Sarathy <vi...@couchbase.com>
Reviewed-by: Ian Maxon <im...@uci.edu>


> CBO Not Picking Up Index (for Equality Pred)
> --------------------------------------------
>
>                 Key: ASTERIXDB-3209
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3209
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler
>            Reporter: Glenn Justo Galvizo
>            Assignee: Vijay Sarathy
>            Priority: Major
>              Labels: triaged
>
> Using a dataset of 2,000,000 records and a highly selective predicate, the index we create does not get used by CBO – it looks like CBO is considering the index, but choosing not to use it.
>  
> {code:java}
> DROP DATAVERSE TestDataverse IF EXISTS;
> CREATE DATAVERSE TestDataverse;
> USE TestDataverse;
> CREATE TYPE TypeR AS {
>   id: bigint,
>   f1: bigint,
>   f2: bigint,
>   f3: bigint,
>   f4: bigint,
>   st: string,
>   fk: bigint
> };
> CREATE DATASET R (TypeR) PRIMARY KEY id;
> LOAD DATASET R USING localfs(("path"="localhost:///.../R.json"),("format"="json"));
> CREATE INDEX rFkIndex ON R (fk);
> ANALYZE DATASET R;
> SELECT * FROM R WHERE R.fk = 1000; {code}
> We see the same plan (i.e. no index) chosen when "fk" is not defined in TypeR.
>  



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