From: Neil Conway <neilc@samurai.com>
To: Jignesh Shah <jigneshk@hotmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: MemoryContextSwitchTo during table scan?
Date: Mon, 22 Aug 2005 18:48:18 -0400
Message-ID: <430A5632.10701@samurai.com> (raw)
In-Reply-To: <BAY101-F302023446A2349317A516D0B60@phx.gbl>
References: <BAY101-F302023446A2349317A516D0B60@phx.gbl>
Jignesh Shah wrote:
> Now the question is why there are so many calls to MemoryContextSwitchTo
> in a single SELECT query command? Can it be minimized?
I agree with Tom -- if profiling indicates that MemoryContextSwitchTo()
is the bottleneck, I would be suspicious that your profiling setup is
misconfigured. MemoryContextSwitchTo() is essentially a function call,
two pointer assignments, and a function return. Try rerunning the test
with current sources -- MemoryContextSwitchTo() is now inlined when
using GCC, which should just leave the assignments.
-Neil
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: neilc@samurai.com, jigneshk@hotmail.com
Subject: Re: MemoryContextSwitchTo during table scan?
In-Reply-To: <430A5632.10701@samurai.com>
* 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