ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Lukyanov <stanlukya...@gmail.com>
Subject RE: IGNITE-8386 question (composite pKeys)
Date Wed, 17 Oct 2018 12:30:40 GMT
Yep, just create a separate index.
(I saw in your other messages that you’re already trying that)

Stan

From: eugene miretsky
Sent: 18 сентября 2018 г. 17:56
To: user@ignite.apache.org
Subject: Re: IGNITE-8386 question (composite pKeys)

So how should we work around it now? Just create a new index for (customer_id, date)?

Cheers,
Eugene

On Mon, Sep 17, 2018 at 10:52 AM Stanislav Lukyanov <stanlukyanov@gmail.com> wrote:
Hi,
 
The thing is that the PK index is currently created roughly as
    CREATE INDEX T(_key)
and not
    CREATE INDEX T(customer_id, date).
 
You can’t use the _key column in the WHERE clause directly, so the query optimizer can’t
use the index.
 
After the IGNITE-8386 is fixed the index will be created as a multi-column index, and will
behave the way you expect (e.g. it will be used instead of the affinity key index).
 
Stan
 
From: eugene miretsky
Sent: 12 сентября 2018 г. 23:45
To: user@ignite.apache.org
Subject: IGNITE-8386 question (composite pKeys)
 
Hi, 
 
A question regarding https://issues.apache.org/jira/browse/IGNITE-8386?focusedCommentId=16511394&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16511394
 
It states that a pkey index with a  compoise pKey is "effectively useless". Could you please
explain why is that? We have a pKey that we are using as an index. 
 
Also, on our pKey is (customer_id, date) and affinity column is customer_id. I have noticed
that most queries use AFFINITY_KEY index. Looking at the source code, AFFINITY_KEY index should
not even be created since the first field of the pKey  is the affinity key. Any idea what
may be happening? 
 
Cheers,
Eugene
 


Mime
View raw message