hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted <yuzhih...@gmail.com>
Subject Re: schema design: rows vs wide columns
Date Sun, 07 Apr 2013 18:58:16 GMT
If you store service Id by month, how do you deal with time range in query that spans partial
month(s) ?

With regard to number of column families, 3 is the recommended maximum. 

Cheers

On Apr 7, 2013, at 1:03 AM, shawn du <shawndowell@gmail.com> wrote:

> Hello,
> 
> I am newer for hbase, but i have some experience on cassandra. In the
> official document, it is said prefer to use rows instead of columns. I
> don't know whether I should follow.
> This is my user case:
> I have about hundreds of services. each service is stored by a
> number(service id). we try to store users registration for specific service
> in a day.
> so there are two solutions for this:
> rows:
> rowkey: month(2013-03) columns will be each service ids. values will be the
> number for each service.
> wide columns:
> rowkey: serviceId, columns/values will be months and numbers.
> 
> Query requirement:
> we only query for a specific service id and time between a start time and
> end time.
> 
> so which solution is better?
> 
> also another question:
> it is said that we 'd better desgin less than 3 column families. it is
> true? can i create as many as tables i need in hbase?
> 
> Thanks in advance.
> 
> BR.Shawn

Mime
View raw message