Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Jan Lehnardt
On 11 Feb 2015, at 11:30, Alexander Shorin kxe...@gmail.com wrote: On Wed, Feb 11, 2015 at 1:25 PM, Mike Marino mmar...@gmail.com wrote: On Wed, Feb 11, 2015 at 11:18 AM, Alexander Shorin kxe...@gmail.com wrote: As for btree, it allows to deduplicate map functions result. Say, you need

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Kiril Stankov
So, is it also true that if one removes a view from a ddoc, all views in this ddoc will be rebuilt? 10x. *Regards,* Kiril Stankov On 2/11/2015 12:18 PM, Alexander Shorin wrote: On Wed, Feb 11, 2015 at 12:43 PM, Kiril

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Kiril Stankov
Sorry, please disregard, too late for work. The answer is in the original reply. Must go to bed, obviously... On 2/12/2015 12:57 AM, Kiril Stankov wrote: So, is it also true that if one removes a view from a ddoc, all views in this ddoc will be rebuilt? 10x.

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Alexander Shorin
On Wed, Feb 11, 2015 at 12:30 PM, Ben Ng m...@benng.me wrote: I don’t understand why a view in the same design doc would slow down another view, when I only tried to fetch the one i cared about. Does Couch build all the views at once? Yes, it builds all views in the same ddoc. -- ,,,^..^,,,

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Kiril Stankov
BTW, Is there are problem to have all views in one doc, or one should spread them across several docs - what are the guidelines here? Does it affects how the btree is built? Any impact on the Compact? Thanks. *Best

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Mike Marino
Hi Alexander, On Wed, Feb 11, 2015 at 11:18 AM, Alexander Shorin kxe...@gmail.com wrote: As for btree, it allows to deduplicate map functions result. Say, you need to apply different reduce functions onto the same map function. You'll create two views with the same maps and different reduces.

Why are temp views so much faster than design docs?

2015-02-11 Thread Ben Ng
Hi all, I’m perplexed. Using the exact same map function, and no reduce function, my temp views are performing significantly faster than my design doc during the initial indexing phase. The temp view finishes loading in 26 seconds, while the design doc is on track to take 2-3 hours. I am

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Garren Smith
Do you have any other views defined in that design doc? On 11 Feb 2015, at 11:20 AM, Alexander Shorin kxe...@gmail.com wrote: May be because for temp view you'd reused result of previous run? In term of execution and processing, they have no differences. -- ,,,^..^,,, On Wed, Feb 11,

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Garren Smith
Ben, Glad I can help. If you update a view in a design doc it will rebuild all the views in that design doc. Its best not to put to many views in the same design doc. Cheers Garren On 11 Feb 2015, at 11:30 AM, Ben Ng m...@benng.me wrote: Garren, Ah ha! Once I isolated the view I

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Alexander Shorin
On Wed, Feb 11, 2015 at 1:25 PM, Mike Marino mmar...@gmail.com wrote: On Wed, Feb 11, 2015 at 11:18 AM, Alexander Shorin kxe...@gmail.com wrote: As for btree, it allows to deduplicate map functions result. Say, you need to apply different reduce functions onto the same map function. You'll

Re: Why are temp views so much faster than design docs?

2015-02-11 Thread Alexander Shorin
May be because for temp view you'd reused result of previous run? In term of execution and processing, they have no differences. -- ,,,^..^,,, On Wed, Feb 11, 2015 at 12:14 PM, Ben Ng m...@benng.me wrote: Hi all, I’m perplexed. Using the exact same map function, and no reduce function, my