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

Yury Gerzhedovich updated IGNITE-11250:
---------------------------------------
    Description: 
We shouldn't create AFFINITY_KEY index in case we already have PK INDEX which 
has first column the same as affinity column.

As of now we have similar optimization: check all indexes to start on affinity 
column, however it doesn't work, due to affinity key index creating during 
create system indexes and no any indexes exists for a table for the moment. We 
just have prepared PK index, which should be checked. In case first column PK 
indexes equals to affinity column, then affinity index shouldn't be created

see 
org.apache.ignite.internal.processors.query.h2.H2TableDescriptor#createSystemIndexes

The task may be better to do together with IGNITE-11125, due to, seems, both of 
them required compatibility changes.

  was:
We shouldn't create AFFINITY_KEY index in case we already have PK INDEX which 
has first column the same as affinity column.

As of now we have similar optimization: check all indexes to start on affinity 
column, however it doesn't work, due to affinity key index creating during 
create system indexes and no any indexes exist for a table for the moment. We 
just have prepared PK indexes, which should be checked. In case first column PK 
indexes equals to affinity column, then affinity index shouldn't be created

see 
org.apache.ignite.internal.processors.query.h2.H2TableDescriptor#createSystemIndexes

The task may be better to do together with IGNITE-11125, due to, seems, both of 
them required compatibility changes.


> Create affinity key index only when it required
> -----------------------------------------------
>
>                 Key: IGNITE-11250
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11250
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Yury Gerzhedovich
>            Assignee: Yury Gerzhedovich
>            Priority: Major
>
> We shouldn't create AFFINITY_KEY index in case we already have PK INDEX which 
> has first column the same as affinity column.
> As of now we have similar optimization: check all indexes to start on 
> affinity column, however it doesn't work, due to affinity key index creating 
> during create system indexes and no any indexes exists for a table for the 
> moment. We just have prepared PK index, which should be checked. In case 
> first column PK indexes equals to affinity column, then affinity index 
> shouldn't be created
> see 
> org.apache.ignite.internal.processors.query.h2.H2TableDescriptor#createSystemIndexes
> The task may be better to do together with IGNITE-11125, due to, seems, both 
> of them required compatibility changes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to