Views use the same append-only B-tree storage as the database files. So when you update a doc, the old revision will be there until compaction.
On Tue, Mar 2, 2010 at 1:20 PM, Sean Clark Hess <[email protected]> wrote: >> >> No, although you can have a different view emitting [user, time, station] > > instead of [user, station, time] > > > Good point. I'm constantly worried about size, since that database is 12 GB > without any views. > > Multi-range queries have been mooted as a future feature. > > > Mooted? As in "decided to be moot"? I've never heard it used as a verb > before :) I'm ok working around it, but I don't really see why not to add it > if you're allowed to ask for multiple keys. > > Do remember that views themselves can be compacted. > > > Woah, what? What does that even mean? I thought compaction just removed old > versions of documents. Does Couch keep around old versions of views? > > Thanks for the tip about the caching. > > On Mon, Mar 1, 2010 at 11:36 AM, Brian Candler <[email protected]> wrote: > >> 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. >> >> Cheers, >> >> Brian. >> >
