[
https://issues.apache.org/jira/browse/IGNITE-7015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279210#comment-16279210
]
ASF GitHub Bot commented on IGNITE-7015:
----------------------------------------
GitHub user dolphin1414 opened a pull request:
https://github.com/apache/ignite/pull/3150
IGNITE-7015: Indexes are updated only if the indexed fields are changed.
Now if it's possible to update row in-place (without link changing), and
indexed columns haven't been changed, no indexes will be updated.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-7015
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3150.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3150
----
commit d5490b0e54491658e5fddc95e8d9779614e6f4ad
Author: rkondakov <[email protected]>
Date: 2017-12-05T16:49:48Z
IGNITE-7015: Indexes are updated only if the indexed fields are changed.
----
> SQL: index should be updated only when relevant values changed
> --------------------------------------------------------------
>
> Key: IGNITE-7015
> URL: https://issues.apache.org/jira/browse/IGNITE-7015
> Project: Ignite
> Issue Type: Task
> Components: sql
> Reporter: Vladimir Ozerov
> Assignee: Roman Kondakov
> Labels: iep-1, performance
> Fix For: 2.4
>
>
> See {{GridH2Table.update}} method. Whenever value is updated, we propagate it
> to all indexes. Consider the following case:
> 1) Old row is not null, so this is "update", not "create".
> 2) Link hasn't changed
> 3) Indexed fields haven't changed
> If all conditions are met, we can skip index update completely, as state
> before and after will be the same. This is especially important when
> persistence is enabled because currently we generate unnecessary dirty pages
> what increases IO pressure.
> Suggested fix:
> 1) Iterate over index columns, skipping key and affinity columns (as they are
> guaranteed to be the same);
> 2) Compare relevant index columns of both old and new rows
> 3) If all columns are equal, do nothing.
> Fields should be read through {{GridH2KeyValueRowOnheap#getValue}}, because
> in this case we will re-use value cache transparently.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)