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/07/16 22:44:00 UTC
[jira] [Assigned] (ASTERIXDB-3462) Incorrect cardinality estimation with multicolumn PK-PK self joins
[ https://issues.apache.org/jira/browse/ASTERIXDB-3462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vijay Sarathy reassigned ASTERIXDB-3462:
----------------------------------------
Assignee: Vijay Sarathy
> Incorrect cardinality estimation with multicolumn PK-PK self joins
> ------------------------------------------------------------------
>
> Key: ASTERIXDB-3462
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3462
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Reporter: Vijay Sarathy
> Assignee: Vijay Sarathy
> Priority: Major
>
> Consider the orders collection in CH2 which has (o_id, o_w_id, and o_d_id) as the composite PK. The following query,
> {code:java}
> select count(*) from orders x, orders y
> where x.o_id = y.o_id AND y.o_w_id = x.o_w_id AND y.o_d_id = x.o_d_id
> {code}
> The overall cardinality of this should be the cardinality of orders since the join is a PK-PK join. However, we underestimate this cardinality as we do not recognize the composite PK.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)