From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [Sender Address Forgery]Re: path toward faster partition pruning |
Date: | 2017-11-07 02:45:11 |
Message-ID: | bbb3d0f7-861c-92eb-fb87-e2423e0031a3@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017/11/06 21:52, David Rowley wrote:
> On 6 November 2017 at 23:01, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> OK, I have gotten rid of the min/max partition index interface and instead
>> adopted the bms_add_range() approach by including your patch to add the
>> same in the patch set (which is now 0002 in the whole set). I have to
>> admit that it's simpler to understand the new code with just Bitmapsets to
>> look at, but I'm still a bit concerned about materializing the whole set
>> right within partition.c, although we can perhaps optimize it later.
>
> Thanks for making that change. The code looks much more simple now.
>
> For performance, if you're worried about a very large number of
> partitions, then I think you're better off using bms_next_member()
> rather than bms_first_member(), (likely this applies globally, but you
> don't need to worry about those).
>
> The problem with bms_first_member is that it must always loop over the
> 0 words before it finds any bits set for each call, whereas
> bms_next_member will start on the word it was last called for. There
> will likely be a pretty big performance difference between the two
> when processing a large Bitmapset.
Ah, thanks for the explanation. I will change it to bms_next_member() in
the next version.
>> Attached updated set of patches, including the fix to make the new pruning
>> code handle Boolean partitioning.
>
> Thanks. I'll look over it all again starting my Tuesday morning. (UTC+13)
Thank you.
Regards,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2017-11-07 02:57:06 | Re: why not parallel seq scan for slow functions |
Previous Message | Michael Paquier | 2017-11-07 02:18:26 | Re: [PATCH] Assert that the correct locks are held when calling PageGetLSN() |