couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: View Troubles
Date Mon, 01 Mar 2010 18:36:59 GMT
On Mon, Mar 01, 2010 at 10:16:11AM -0700, Sean Clark Hess wrote:
> I think I'll just emit every half hour. I can't do ranges easily, because
> another query needs to ask for "everything playing on all of a user's
> stations at 10:00". I have to use the "keys" post for that, which doesn't
> take ranges.

No, although you can have a different view emitting [user, time, station]
instead of [user, station, time]

Multi-range queries have been mooted as a future feature.

> Right now we're emitting the data we need for that (above) query as the
> value for that view. I was mostly worried about size because we're emitting
> so much data. Would it be much slower to emit null and use include_docs?
> That would save a significant amount of disk space, right?

The view index will be smaller by the size of each document. When fetching
docs using include_docs=true it'll need to traverse the Btree to find them;
but equally it will need to traverse less disk space for the view itself,
and hence may find more of it in cache.  You'll need to evaluate the
tradeoff yourself, but if you're only fetching some dozens of rows at a time
I'd have thought the include_docs overhead would not be noticed.

Do remember that views themselves can be compacted.



View raw message