incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Hilmer ...@widetrail.dk>
Subject Re: Question on view design for both Hierarchy and Date.
Date Mon, 27 Sep 2010 19:30:50 GMT
Thanks for the clarification.
I was aware that it was diskspace intensive, but hey disks are cheap :-)

I will read up this upcoming multi_views feature to see what awesomeness are
in store for me.

--Søren

On Mon, Sep 27, 2010 at 2:01 PM, Wout Mertens <wout.mertens@gmail.com>wrote:

> On Sep 26, 2010, at 13:02 , Søren Hilmer wrote:
>
> > Hi
> >
> > A few questions to your comments
> >
> > On Thu, Sep 23, 2010 at 10:06 PM, Wout Mertens <wout.mertens@gmail.com
> >wrote:
> >
> >> 2 comments:
> >> - your time is a fixed-length string (until the year 10000 ;)) so you
> >> could just leave it as-is instead of splitting it
> >>
> >
> > Yes, but will that allow me to do the sum on a monthly basis, like with
> this
> > query for september:
> > startkey=["A","B","c6",2010,9,1]&endkey=["A","B","c6",2010,9,31,{}]
>
> Simply query for
> startkey=["A","B","c6","2010-09-01"]&endkey=["A","B","c6","2010-09-32"]
>
> >> - using group=true you can get the sum for each sub level in your key
> >> array so you don't have to emit the full path. Just emit the path and
> >> then the time.
> >>
> >
> > Hmm, if I do that how do I query the sum under for instance the root for
> a
> > period?
>
> Oh I see. Yeah you can't do that unless you use multi_views which are in
> development.
>
> Basically you have a 2-dimensional search space (path and time) and you're
> cheating your way into 1-dimensionality by preparing all the possible
> 2-dimensional queries you might ask. That works but it costs you disk space
> obviously.
>
> Wout.
>
>


-- 

Søren Hilmer, M.Sc., M.Crypt.

wideTrail                   Phone:  +45 25481225

Pilevænget 41           Email:  sh at widetrail.dk <sh@widetrail.dk>

DK-8961  Allingåbro   Web:    www.widetrail.dk

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message