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

Vladimir Ozerov updated IGNITE-6054:
------------------------------------
    Fix Version/s: 2.3

> SQL: Add option to store primitive keys in plain form for CREATE TABLE
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-6054
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6054
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>              Labels: performance
>             Fix For: 2.3
>
>
> Currently we create separate internal type for primary key columns. This is 
> necessary to avoid clashes between keys of the same type within the same 
> caches (ironically, we do not allow multiple dynamic tables per cache).
> The most widely used PK is single-column key of {{Long}} or {{String}} data 
> type. If we store a key plain {{long}}, it will consume 9 bytes. If we store 
> it as an object with long field, it will consume 24 + 9 = 33 bytes. What is 
> worse, in the latter case we will have to copy key object back and forth 
> between page memory and application code many times, while for plain long key 
> we simply do {{Unsafe.getLong}}.
> For this reason, it makes sense to introduce special mode for {{CREATE 
> TABLE}} command, when key will not be wrapped into a class, and will be 
> stored as is. Let's name it {{plainPrimaryKey}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to