Jon, I believe that it's just only metadata stuff. The VARCHAR implementation itself doesn't rely on the size.
Thanks, Sergey On Wed, Mar 30, 2016 at 4:51 PM, Cox, Jonathan A <[email protected]> wrote: > Sergey, > > 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? > > -Jonathan > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Sergey Soldatov > Sent: Wednesday, March 30, 2016 5:38 PM > To: [email protected] > Subject: [EXTERNAL] Re: TEXT Data type in Phoenix? > > Jon, > 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) > > Thanks, > Sergey > > On Wed, Mar 30, 2016 at 1:57 PM, Cox, Jonathan A <[email protected]> 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
