ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (IGNITE-6054) SQL: Add option to store primitive keys in plain form for CREATE TABLE
Date Tue, 05 Sep 2017 09:09:01 GMT

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

Vladimir Ozerov reassigned IGNITE-6054:

    Assignee:     (was: Alexander Paschenko)

> 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
> 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

View raw message