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 b8flowerf...@gmail.com 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

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 robertmh...@gmail.com 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

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 jeff.ja...@gmail.com wrote: On Tue, Jun 10, 2014 at 5:17 AM, Robert Haas robertmh...@gmail.com 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