You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Chen Luo (JIRA)" <ji...@apache.org> on 2017/05/26 23:56:04 UTC
[jira] [Created] (ASTERIXDB-1922) Change the behavior of Upsert on
secondary index for component correlated
Chen Luo created ASTERIXDB-1922:
-----------------------------------
Summary: Change the behavior of Upsert on secondary index for component correlated
Key: ASTERIXDB-1922
URL: https://issues.apache.org/jira/browse/ASTERIXDB-1922
Project: Apache AsterixDB
Issue Type: Improvement
Reporter: Chen Luo
Priority: Minor
Currently, when we upsert a tuple, the secondary index is modified by comparing the old secondary key and the new secondary key. If they are exactly the same, then do nothing. Otherwise, we delete the (old secondary key, primary key) pair, and insert the (new secondary key, primary key) pair.
However, this behavior is not suitable if we want to make disk components of the primary index and secondary indexes correlated. The end goal is that each disk component of the secondary key should correspond to one disk component of the primary key. With this property, after we get a list of primary keys from the secondary index, we only need to search one disk component of the primary index for each primary key, which would greatly reduce the time for point lookups.
In order for the above optimization to work, the upsert should always delete the (old secondary key, primary key) pair (unless the primary key is inserted for the first time), and insert the (new secondary key, primary key) pair.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)