J-M:
How many times did you try the pair of queries ?

Since scan was run first, this would give the get query some advantage,
right ?

Cheers

On Tue, May 19, 2015 at 7:34 PM, Jean-Marc Spaggiari <
jean-m...@spaggiari.org> wrote:

> Are not Scan and Gets supposed to be almost as fast?
>
> I have a pretty small table with 65K lines, few columns (hundred?) trying
> to go a get and a scan.
>
> hbase(main):009:0> scan 'sensors', { COLUMNS =>
> ['v:f92acb5b-079a-42bc-913a-657f270a3dc1'], STARTROW => '000a', LIMIT => 1
> }
> ROW
> COLUMN+CELL
>
>  000a
> column=v:f92acb5b-079a-42bc-913a-657f270a3dc1, timestamp=1432088038576,
> value=\x08000aHf92acb5b-079a-42bc-913a-657f270a3dc1\x0EFAILURE\x0CNE-858\x
>
>
> 140-0000-000\x02\x96\x01SXOAXTPSIUFPPNUCIEVQGCIZHCEJBKGWINHKIHFRHWHNATAHAHQBFRAYLOAMQEGKLNZIFM
> 000a
> 1 row(s) in 12.6720 seconds
>
> hbase(main):010:0> get 'sensors', '000a', {COLUMN =>
> 'v:f92acb5b-079a-42bc-913a-657f270a3dc1'}
> COLUMN
> CELL
>
>  v:f92acb5b-079a-42bc-913a-657f270a3dc1            timestamp=1432088038576,
>
> value=\x08000aHf92acb5b-079a-42bc-913a-657f270a3dc1\x0EFAILURE\x0CNE-858\x140-0000-000\x02\x96\x01SXOAXTPSIUFPPNUCIEVQGCI
>
> ZHCEJBKGWINHKIHFRHWHNATAHAHQBFRAYLOAMQEGKLNZIFM
> 000a
>
> 1 row(s) in 0.0280 seconds
>
>
> They both return the same result. However, the get returns in 28ms while
> the scan returns in 12672ms.
>
> How come can the scan be that slow? Is it normal? If I remove the QC from
> the scan, then it takes only 250ms to return all the columns. I think
> something is not correct.
>
> I'm running on 1.0.0-cdh5.4.0 so I guess it's the same for 1.0.x...
>
> JM
>

Reply via email to