You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Taewoo Kim (JIRA)" <ji...@apache.org> on 2016/06/22 22:50:16 UTC

[jira] [Created] (ASTERIXDB-1495) Secondary Index-only scan without any predicate

Taewoo Kim created ASTERIXDB-1495:
-------------------------------------

             Summary: Secondary Index-only scan without any predicate
                 Key: ASTERIXDB-1495
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1495
             Project: Apache AsterixDB
          Issue Type: Improvement
            Reporter: Taewoo Kim


Currently, the optimizer chooses a secondary index when a selection (or join) predicate exists on a field with a secondary index. An index-only scan will be applied soon based on this optimization. However, it still requires a selection predicate such as the following query. Let's assume we have a secondary B+Tree index on price.

for $o in dataset MugShot
where $o.price > 10
return {"SK":$o.price, "PK":$o.id} 

So, it will be a further improvement if we support a secondary index-only scan without any predicates such as the following query.  Like the above query, we don't need to go through the primary index and this will save a lot of time. Of course, we need to consider whether the secondary key field is nullable or not to provide the correct answer.

for $o in dataset MugShot
return {"SK":$o.price, "PK":$o.id} 




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