Jonathan Resnick | 1 Aug 04:53 2008
Picon

windows build?

Has anyone got CouchDB successfully built on Windows?  I feel silly
asking this but for better or worse Windows is what I know.  On the
other hand, the abiliy to get it going easily on Windows would open it
up to a whole new audience to try out.

I have tried following the directions posted here
http://wiki.apache.org/couchdb/InstallingOnWindows, but I can't seem
to find binaries for SpiderMonkey anywhere on the Mozilla site, nor
have I had any luck compiling it from source (the *.mdp file is too
old to open in Visual Studio and NMAKE craps out with some
unintelliglible error).

I have also searched the archives of this mailing list but haven't
come across anything relevant.  Any ideas would be a great help.

jon

Paul Bonser | 1 Aug 05:42 2008
Picon

Re: Is it possible to evaluate a view on a 20.000 documents database?

On 7/31/08, Demetrius Nunes <demetriusnunes@...> wrote:
> The view I am trying to create is really simple:
>
>  function(doc) {
>   if
>  (doc.classe_id.match(/8a8090a20075ffba010075ffbed600028a8090a20075ffba010075ffbf7200c48a8090a20075ffba010075ffbf7200d9/))
>     emit(doc.id, doc);
>  }

Any reason you're using a regex rather than just using string comparison?

--

-- 
Paul Bonser
http://blog.paulbonser.com

Johan Liseborn | 1 Aug 09:37 2008
Picon

Re: Is it possible to evaluate a view on a 20.000 documents database?

On Fri, Aug 1, 2008 at 00:38, Demetrius Nunes
<demetriusnunes@...> wrote:
> The view I am trying to create is really simple:
>
> function(doc) {
>  if
> (doc.classe_id.match(/8a8090a20075ffba010075ffbed600028a8090a20075ffba010075ffbf7200c48a8090a20075ffba010075ffbf7200d9/))
>    emit(doc.id, doc);
> }
>
> It's being applied to a 20.000 documents dataset and I've already waited
> several minutes until the CPU cooled off, but to my surprise, the view is
> still taking a long time to respond when I try to run it. Ive never actually
> got a result out of it...
>
> Am I doing something wrong?

I guess you have already gotten a number of answers, but just to give
you some additional input (which points in the same direction), here
is some data from a little experiment I just did:

I have a database consisting of documents that describe "projects";
each document has a number of fields including fields for project
manager, due date, an array of project activities (which in turn has
descriptions, an array of assigned workers, etc), an array of notes,
and a field giving the priority (the point being the documents are
"semi-complex", or at least I *think* they could be considered so; I
am not sure how much this matter, but it seems to matter a little, at
least when the document itself is part of the output of the view
(which it *isn't* in my example below, but anyway...)).
(Continue reading)

Demetrius Nunes | 1 Aug 14:45 2008
Picon

Re: Is it possible to evaluate a view on a 20.000 documents database?

Johan, this was excellent stuff. Thanks for the enlightenment.
As for the question on why I am using a regex insted of a plain string
comparison, is because, the "classe_id" field is structured in a way that it
starts with a string (say ABC) but can end in several other ways, so the
documents may have field values of ABCDEF, ABCGHI, ABCRST, etc. So, I am
just checking if the classe_id field starts with a certain string. Is regex
comparison a heavy operation in Javascript?

rgds,
Demetrius

On Fri, Aug 1, 2008 at 4:37 AM, Johan Liseborn <johan.liseborn@...>wrote:

> On Fri, Aug 1, 2008 at 00:38, Demetrius Nunes <demetriusnunes@...>
> wrote:
> > The view I am trying to create is really simple:
> >
> > function(doc) {
> >  if
> >
> (doc.classe_id.match(/8a8090a20075ffba010075ffbed600028a8090a20075ffba010075ffbf7200c48a8090a20075ffba010075ffbf7200d9/))
> >    emit(doc.id, doc);
> > }
> >
> > It's being applied to a 20.000 documents dataset and I've already waited
> > several minutes until the CPU cooled off, but to my surprise, the view is
> > still taking a long time to respond when I try to run it. Ive never
> actually
> > got a result out of it...
> >
(Continue reading)

Dean Landolt | 1 Aug 16:11 2008

Re: Is it possible to evaluate a view on a 20.000 documents database?

>
> So, I am
> just checking if the classe_id field starts with a certain string. Is regex
> comparison a heavy operation in Javascript?

I'm going go out on a limb and say it's *way* more heavyweight than a
doc.classe_id.indexOf('...') == 0 which from the sounds of it would give you
the same results.
Ronny Hanssen | 1 Aug 17:46 2008
Picon

Re: windows build?

I choose to set up a vmware image and do it in kubuntu.

I just got the feeling that building it for Windows was looking for
trouble...

~Ronny

On Fri, Aug 1, 2008 at 4:53 AM, Jonathan Resnick <jresnick@...> wrote:

> Has anyone got CouchDB successfully built on Windows?  I feel silly
> asking this but for better or worse Windows is what I know.  On the
> other hand, the abiliy to get it going easily on Windows would open it
> up to a whole new audience to try out.
>
> I have tried following the directions posted here
> http://wiki.apache.org/couchdb/InstallingOnWindows, but I can't seem
> to find binaries for SpiderMonkey anywhere on the Mozilla site, nor
> have I had any luck compiling it from source (the *.mdp file is too
> old to open in Visual Studio and NMAKE craps out with some
> unintelliglible error).
>
> I have also searched the archives of this mailing list but haven't
> come across anything relevant.  Any ideas would be a great help.
>
> jon
>
Michael Hendricks | 1 Aug 18:08 2008

Re: Is it possible to evaluate a view on a 20.000 documents database?

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.

--

-- 
Michael

Paul Davis | 1 Aug 18:17 2008
Picon

Re: Is it possible to evaluate a view on a 20.000 documents database?

On Fri, Aug 1, 2008 at 12:08 PM, Michael Hendricks <michael@...> 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
>
(Continue reading)

Demetrius Nunes | 1 Aug 18:27 2008
Picon

Re: Is it possible to evaluate a view on a 20.000 documents database?

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@...>wrote:

> On Fri, Aug 1, 2008 at 12:08 PM, Michael Hendricks <michael@...>
> 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
(Continue reading)

Demetrius Nunes | 1 Aug 18:27 2008
Picon

Re: windows build?

Same here.

On Fri, Aug 1, 2008 at 12:46 PM, Ronny Hanssen <super.ronny@...>wrote:

> I choose to set up a vmware image and do it in kubuntu.
>
> I just got the feeling that building it for Windows was looking for
> trouble...
>
>
> ~Ronny
>
> On Fri, Aug 1, 2008 at 4:53 AM, Jonathan Resnick <jresnick@...>
> wrote:
>
> > Has anyone got CouchDB successfully built on Windows?  I feel silly
> > asking this but for better or worse Windows is what I know.  On the
> > other hand, the abiliy to get it going easily on Windows would open it
> > up to a whole new audience to try out.
> >
> > I have tried following the directions posted here
> > http://wiki.apache.org/couchdb/InstallingOnWindows, but I can't seem
> > to find binaries for SpiderMonkey anywhere on the Mozilla site, nor
> > have I had any luck compiling it from source (the *.mdp file is too
> > old to open in Visual Studio and NMAKE craps out with some
> > unintelliglible error).
> >
> > I have also searched the archives of this mailing list but haven't
> > come across anything relevant.  Any ideas would be a great help.
> >
(Continue reading)


Gmane