couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Demetrius Nunes" <demetriusnu...@gmail.com>
Subject Re: Is it possible to evaluate a view on a 20.000 documents database?
Date Fri, 01 Aug 2008 16:27:21 GMT
Thanks for all the advice. I'll do that and get back to you about how it
went.
Cheers.

On Fri, Aug 1, 2008 at 1:17 PM, Paul Davis <paul.joseph.davis@gmail.com>wrote:

> On Fri, Aug 1, 2008 at 12:08 PM, Michael Hendricks <michael@ndrix.org>
> wrote:
> > On Thu, Jul 31, 2008 at 07:38:03PM -0300, Demetrius Nunes wrote:
> >> The view I am trying to create is really simple:
> >>
> >> function(doc) {
> >>   if
> >>
> (doc.classe_id.match(/8a8090a20075ffba010075ffbed600028a8090a20075ffba010075ffbf7200c48a8090a20075ffba010075ffbf7200d9/))
> >>     emit(doc.id, doc);
> >> }
> >
> > You might try changing your emit() to
> >
> >    emit(doc.id, null);
> >
> > I seem to recall some discussion on the mailing list that including the
> > document in the emitted value (especially for large documents) can
> > significantly affect view performance.
> >
>
> Whatever you emit is stored in the view. So if you're emitting an
> entire doc, the entire doc is going to be stored twice (Once in the
> db, once in the view). Not sure that there's any extra overhead other
> than storing the doc. Although, storing the doc is going to require a
> second json <-> erlang conversion. Not sure how expensive that really
> is, but I seem to remember chatter about the conversion being
> noticeable.
>
> > --
> > Michael
> >
>



-- 
____________________________
http://www.demetriusnunes.com

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