Re: Statements caching

2018-07-27 Thread James Taylor
There's no statement caching available in Phoenix. That would be a good
contribution, though.
Thanks,
James

On Thu, Jul 26, 2018 at 10:45 AM, Batyrshin Alexander <0x62...@gmail.com>
wrote:

>  Hi all,
> Im wondering how to enable statement caching in Phoenix JDBC Driver.
> Is there anything like "cachePrepStmts"?
>


Re: Row Scan In HBase Not Working When Table Created With Phoenix

2018-07-27 Thread Miles Spielberg
SQL INTEGER is not stored as strings, but as 4-bytes of encoded binary. See
https://phoenix.apache.org/language/datatypes.html#integer_type

Miles Spielberg
Staff Software Engineer


O. 650.485.1102
900 Jefferson Ave
Redwood City, CA 94063

On Thu, Jul 26, 2018 at 5:44 PM, alchemist 
wrote:

> create table empPh2(id integer primary key, fname varchar, lname
> varchar)COLUMN_ENCODED_BYTES=0
> upsert into empPh2 values (1, 'A', 'B');
> upsert into empPh2 values (2, 'B', 'B');
> upsert into empPh2 values (3, 'C', 'B');
> upsert into empPh2 values (4, 'John', 'B');
>
>
> Then when to HBase to do the range query using following command:
>
> hbase(main):004:0> scan 'EMPPH2', {STARTROW => '1', ENDROW => '3'}
> ROWCOLUMN+CELL
>
>
> 0 row(s) in 0.0030 seconds
>
> I saw row in HBASE has extra symbols.  Not sure how to have 1:1 mapping
> between HBASE table to Phoenix table.
>
> ROW  COLUMN+CELL
>
>
>  \x80\x00\x00\x01column=0:FNAME,
> timestamp=1532651140732, value=A
>
>  \x80\x00\x00\x01column=0:LNAME,
> timestamp=1532651140732, value=B
>
>  \x80\x00\x00\x01column=0:_0,
> timestamp=1532651140732, value=x
>
>  \x80\x00\x00\x02column=0:FNAME,
> timestamp=1532651151877, value=B
>
>  \x80\x00\x00\x02column=0:LNAME,
> timestamp=1532651151877, value=B
>
>  \x80\x00\x00\x02column=0:_0,
> timestamp=1532651151877, value=x
>
>  \x80\x00\x00\x03column=0:FNAME,
> timestamp=1532651164899, value=C
>
>  \x80\x00\x00\x03column=0:LNAME,
> timestamp=1532651164899, value=B
>
>
>
> --
> Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/
>