phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Jonathan A" <>
Subject RE: [EXTERNAL] Re: TEXT Data type in Phoenix?
Date Wed, 30 Mar 2016 23:51:14 GMT

Thanks for the tip. Is there any real performance reason (memory or speed) to use a pre-defined
length for VARCHAR? Or is it really all the same under the hood?


-----Original Message-----
From: [] On Behalf Of Sergey Soldatov
Sent: Wednesday, March 30, 2016 5:38 PM
Subject: [EXTERNAL] Re: TEXT Data type in Phoenix?

It seems that documentation is a bit outdated. VARCHAR supports exactly what you want:
create table x (id bigint primary key, x varchar); upsert into x values (1, "..... (a lot
of text there) " );
0: jdbc:phoenix:localhost> select length(x) from x;
| LENGTH(X)  |
| 1219       |
1 row selected (0.009 seconds)


On Wed, Mar 30, 2016 at 1:57 PM, Cox, Jonathan A <> wrote:
> Is it possible to have the equivalent of the SQL data type “TEXT” with 
> Phoenix? The reason being, my data has columns with unspecified text length.
> If I go with a varchar,  loading the entire CSV file into the database 
> may fail if one entry is too long.
> Maybe, however, there is really no reason to use TEXT with Phoenix? 
> Perhaps just using VARCHAR with a very long size is equivalent in 
> terms of performance and memory usage (given that Phoenix is HBase under the hood)?
> Thanks,
> Jon
View raw message