You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Naveen <na...@gmail.com> on 2018/01/03 07:39:54 UTC
Best practice while creating tables - specifying the length of the
data type
Hi
I am using 2.3
Looks like ignite does not support CLOB, can I use varchar instead of CLOB
if my requirement is to store 100000 characters
CREATE TABLE MAP_CUST
(
PARTY_ID CLOB,
MAPPING_ID VARCHAR(1000) NULL,
UPDATEDBY VARCHAR(4000 CHAR) NULL,
SYNCREQUIRED VARCHAR(100) NULL,
ADB_SOURCE CHAR(1) NULL,
SYNCTO VARCHAR(10) NULL,
PRIMARY KEY (MAPPING_ID)
)WITH "template=partitioned,backups=1,cache_name=MAP_CUST";
And, what is the best practice, do we need to specify the exact size or
omitting the size completely, which one is efficient.
Thanks
Naveen
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Best practice while creating tables - specifying the length of
the data type
Posted by Denis Mekhanikov <dm...@gmail.com>.
Hi Naveen!
CLOB is not supported in Ignite as an SQL-specific type. You can use
VARCHAR for character data or BINARY for binary data. VARCHAR corresponds
to java.lang.String type, and BINARY - to byte[].
There is no need to specify length for VARCHARs, it has no effect. VARCHARs
always can have unlimited lengths.
Denis
ср, 3 янв. 2018 г. в 10:40, Naveen <na...@gmail.com>:
> Hi
>
> I am using 2.3
>
> Looks like ignite does not support CLOB, can I use varchar instead of CLOB
> if my requirement is to store 100000 characters
>
> CREATE TABLE MAP_CUST
> (
> PARTY_ID CLOB,
> MAPPING_ID VARCHAR(1000) NULL,
> UPDATEDBY VARCHAR(4000 CHAR) NULL,
> SYNCREQUIRED VARCHAR(100) NULL,
> ADB_SOURCE CHAR(1) NULL,
> SYNCTO VARCHAR(10) NULL,
> PRIMARY KEY (MAPPING_ID)
> )WITH "template=partitioned,backups=1,cache_name=MAP_CUST";
>
> And, what is the best practice, do we need to specify the exact size or
> omitting the size completely, which one is efficient.
>
> Thanks
> Naveen
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>