postgresql/src/backend
Bruce Momjian 3cf1fd3263 Tom Lane <tgl@sss.pgh.pa.us> writes:
> a_ogawa <a_ogawa@hi-ho.ne.jp> writes:
> > It is a reasonable idea. However, the majority part of MemSet was not
> > able to be avoided by this idea. Because the per-tuple contexts are used
> > at the early stage of executor.
>
> Drat.  Well, what about changing that?  We could introduce additional
> contexts or change the startup behavior so that the ones that are
> frequently reset don't have any data in them unless you are working
> with pass-by-ref values inside the inner loop.

That might be possible. However, I think that we should change only
aset.c about this article.
I thought further: We can check whether context was used from the last
reset even when blocks list is not empty. Please see attached patch.

The effect of the patch that I measured is as follows:

o Execution time that executed the SQL ten times.
(1)Linux(CPU: Pentium III, Compiler option: -O2)
 - original: 24.960s
 - patched : 23.114s

(2)Linux(CPU: Pentium 4, Compiler option: -O2)
 - original: 8.730s
 - patched : 7.962s

(3)Solaris(CPU: Ultra SPARC III, Compiler option: -O2)
 - original: 37.0s
 - patched : 33.7s

Atsushi Ogawa (a_ogawa)
2005-06-04 20:14:12 +00:00
..
access Change CRCs in WAL records from 64bit to 32bit for performance reasons. 2005-06-02 05:55:29 +00:00
bootstrap For some reason access/tupmacs.h has been #including utils/memutils.h, 2005-05-06 17:24:55 +00:00
catalog Fix information_schema for OUT and INOUT parameters. 2005-05-31 03:36:24 +00:00
commands Remove unused 'printCost' field from ExplainState, and simplify the code 2005-06-04 02:07:09 +00:00
executor Modify hash_search() API to prevent future occurrences of the error 2005-05-29 04:23:07 +00:00
lib Replace the use of "0" with "NULL" where appropriate in dllist.c, for 2005-01-18 22:59:32 +00:00
libpq Push enable/disable of notify and catchup interrupts all the way down 2005-06-02 21:03:25 +00:00
main Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
nodes Modify hash_search() API to prevent future occurrences of the error 2005-05-29 04:23:07 +00:00
optimizer Change expandRTE() and ResolveNew() back to taking just the single 2005-06-04 19:19:42 +00:00
parser Change expandRTE() and ResolveNew() back to taking just the single 2005-06-04 19:19:42 +00:00
po Translation updates 2005-01-17 20:27:44 +00:00
port Refactor fork()-related code. We need to do various housekeeping tasks 2005-03-10 07:14:03 +00:00
postmaster Modify hash_search() API to prevent future occurrences of the error 2005-05-29 04:23:07 +00:00
regex Add parentheses to macros when args are used in computations. Without 2005-05-25 21:40:43 +00:00
rewrite Change expandRTE() and ResolveNew() back to taking just the single 2005-06-04 19:19:42 +00:00
storage Change CRCs in WAL records from 64bit to 32bit for performance reasons. 2005-06-02 05:55:29 +00:00
tcop Revise handling of dropped columns in JOIN alias lists to avoid a 2005-06-03 23:05:30 +00:00
utils Tom Lane <tgl@sss.pgh.pa.us> writes: 2005-06-04 20:14:12 +00:00
Makefile On Windows, set the postmaster executable's stack size to 4MB, so that 2005-01-26 21:55:26 +00:00
nls.mk New translation 2005-01-09 17:10:29 +00:00