Re: [HACKERS] Re: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller

2014-06-10 Thread Robert Haas
On Tue, Jun 10, 2014 at 1:43 PM, Jeff Janes wrote: > On Tue, Jun 10, 2014 at 5:17 AM, Robert Haas wrote: >> The problem case is when you have 1 batch and the increased memory >> consumption causes you to switch to 2 batches. That's expensive. It >> seems clear based on previous testing that *on

Re: [HACKERS] Re: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller

2014-06-10 Thread Jeff Janes
On Tue, Jun 10, 2014 at 5:17 AM, Robert Haas wrote: > The problem case is when you have 1 batch and the increased memory > consumption causes you to switch to 2 batches. That's expensive. It > seems clear based on previous testing that *on the average* > NTUP_PER_BUCKET = 1 will be better, bu

Re: [HACKERS] Re: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller

2014-06-10 Thread Robert Haas
On Tue, Jun 10, 2014 at 1:13 AM, b8flowerfire wrote: > Thanks for the explanation. But i don't think it is very convincible. > Simply reduce the value of NTUP_PER_BUCKET will enlarge the pointer array > and reduce the tuples in one batch. But is that effect significant to the > performance? > The

[HACKERS] Re: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller

2014-06-09 Thread b8flowerfire
Robert Haas wrote > On Mon, Jun 9, 2014 at 4:06 AM, b8flowerfire < > b8flowerfire@ > > wrote: > > This has come up before. Basically, the problem is that if you reduce > NTUP_PER_BUCKET, the bucket array gets larger, which might reduce the > amount of space available for tuples to the point whe