phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maryann Xue (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-2957) WhereOptimizer to provide an estimate of key selectivity for key filters containing bind variables
Date Wed, 01 Jun 2016 20:32:59 GMT

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

Maryann Xue updated PHOENIX-2957:
---------------------------------
    Issue Type: New Feature  (was: Bug)

> WhereOptimizer to provide an estimate of key selectivity for key filters containing bind
variables
> --------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2957
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2957
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Maryann Xue
>            Priority: Minor
>              Labels: calcite
>
> Calcite will not load values of bind parameters until execution. This will not affect
the runtime efficiency even if the bind parameter appears in primary key related filters,
since we support "dynamic filter" and thus can re-compile it into a SkipScanFilter whenever
possible. But it does affect cost calculation at compile time in some way, so it's better
for Phoenix to be able to provide an estimate of key selectivity if bind parameters appear
in key filters.
>  
> For example, t has a primary key of (k0, k1):
> "select * from t where k0 = ?"
> "select * from t where k0 = 'xxx' and k1 < ?"
> Given some filter estimate constants, like 0.1 for "=", 0.5 for "<" or ">", we
can calculate an estimate of the entire filter selectivity using logic provided by WhereOptimizer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message