From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan
Date: Tue, 01 Sep 2015 15:20:16 +0900
Message-ID: <55E543A0.8060804@lab.ntt.co.jp> (raw)
In-Reply-To: <CAKJS1f9WW0WsSB6OmN7XHkKHQWpjwjE50QpGiy6x80bFy84hgA@mail.gmail.com>
References: <559F9323.4080403@lab.ntt.co.jp>
<CAKJS1f8EOCn+3GhzdVbRD74s=Jf9JpFGxgW6D_P1BuVGb7vaXw@mail.gmail.com>
<55AF3748.9080901@lab.ntt.co.jp>
<55E035F9.1030008@lab.ntt.co.jp>
<CAKJS1f9WW0WsSB6OmN7XHkKHQWpjwjE50QpGiy6x80bFy84hgA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2015/08/30 13:06, David Rowley wrote:
> It's likely not worth changing if there's cases when it'll be slower,
> but curiosity got the better of me and I wondered how extreme a case it
> would take to actually see a slowdown, and per my benchmark results the
> first used column would have to be about attnum 500.
> I used the attached to benchmark. has_system_columns is the current
> method, has_system_columns2 has my changes. Lines are prefixed by the
> position where the first (and only) attnum appears in the bitmap set.
> 1 has_system_columns complete in 1.196000
> 1 has_system_columns2 complete in 0.170000
> 2 has_system_columns complete in 1.198000
> 2 has_system_columns2 complete in 0.167000
> 4 has_system_columns complete in 1.197000
> 4 has_system_columns2 complete in 0.170000
> 8 has_system_columns complete in 1.206000
> 8 has_system_columns2 complete in 0.203000
> 16 has_system_columns complete in 1.202000
> 16 has_system_columns2 complete in 0.237000
> 32 has_system_columns complete in 1.206000
> 32 has_system_columns2 complete in 0.232000
> 64 has_system_columns complete in 1.207000
> 64 has_system_columns2 complete in 0.268000
> 128 has_system_columns complete in 1.205000
> 128 has_system_columns2 complete in 0.368000
> 256 has_system_columns complete in 1.203000
> 256 has_system_columns2 complete in 0.780000
> 512 has_system_columns complete in 1.202000
> 512 has_system_columns2 complete in 1.302000
> 1024 has_system_columns complete in 1.199000
> 1024 has_system_columns2 complete in 3.539000
> So, for what it's worth, could be 6 times faster for an "average" sized
> table, but hey, we're talking nanoseconds anyway...
That's interesting. But ISTM that that needs more discussion, so I'd
like to leave the method as-is at least for now.
Thanks for the experiment!
Best regards,
Etsuro Fujita
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: fujita.etsuro@lab.ntt.co.jp, david.rowley@2ndquadrant.com
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan
In-Reply-To: <55E543A0.8060804@lab.ntt.co.jp>
References: <559F9323.4080403@lab.ntt.co.jp> <CAKJS1f8EOCn+3GhzdVbRD74s=Jf9JpFGxgW6D_P1BuVGb7vaXw@mail.gmail.com> <55AF3748.9080901@lab.ntt.co.jp> <55E035F9.1030008@lab.ntt.co.jp> <CAKJS1f9WW0WsSB6OmN7XHkKHQWpjwjE50QpGiy6x80bFy84hgA@mail.gmail.com> <55E543A0.8060804@lab.ntt.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox