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

Yury Gerzhedovich updated IGNITE-21353:
---------------------------------------
    Description: 
As of now we support choosing type just for secondary indexes, like a 
_CREATE INDEX  idx_name ON table *USING TREE* (column_name)_
But for PK we always create under the hood HASH index.
Let's introduce ability to choose type for PK by the analogy with a secondary 
indexes;
it should be add an optional parameter *USING type* for PRIMARY KEY definition 
and add ability set collation for columns including into PK)
CREATE TABLE ..... PRIMARY KEY *[ USING BTREE | HASH ]* (column1, column2, ... 
column_n))
as example full command: CREATE TABLE my (c1 INT, c2 INT, c3 INT, PRIMARY *KEY 
USING TREE* (c2 ASC, c1 DESC NULL FIRST))

Also let's set BTREE as default for PK without set concrete type.

  was:
As of now we support choosing type just for secondary indexes, like a 
_CREATE INDEX  idx_name ON table *USING TREE* (column_name)_
But for PK we always create under the hood HASH index.
Let's introduce ability to choose type for PK by the analogy with a secondary 
indexes;
it should be add an optional parameter *USING type* for PRIMARY KEY definition
CREATE TABLE ..... PRIMARY KEY *[ USING BTREE | HASH ]* (column1, column2, ... 
column_n)...


Also let's set BTREE as default for PK without set concrete type.


> Sql. Support for choosing the primary key index type.
> -----------------------------------------------------
>
>                 Key: IGNITE-21353
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21353
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Yury Gerzhedovich
>            Priority: Major
>              Labels: ignite-3
>
> As of now we support choosing type just for secondary indexes, like a 
> _CREATE INDEX  idx_name ON table *USING TREE* (column_name)_
> But for PK we always create under the hood HASH index.
> Let's introduce ability to choose type for PK by the analogy with a secondary 
> indexes;
> it should be add an optional parameter *USING type* for PRIMARY KEY 
> definition and add ability set collation for columns including into PK)
> CREATE TABLE ..... PRIMARY KEY *[ USING BTREE | HASH ]* (column1, column2, 
> ... column_n))
> as example full command: CREATE TABLE my (c1 INT, c2 INT, c3 INT, PRIMARY 
> *KEY USING TREE* (c2 ASC, c1 DESC NULL FIRST))
> Also let's set BTREE as default for PK without set concrete type.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to