From: zhangjinyu <beijing_pg@163.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Patch: Optimize memory allocation in function 'bringetbitmap'
Date: Mon, 28 Sep 2015 07:40:54 -0700 (MST)
Message-ID: <1443451254826-5867647.post@n5.nabble.com> (raw)
In-Reply-To: <20150927175608.GM295765@alvherre.pgsql>
References: <495deb78.4186.1500dacaa63.Coremail.beijing_pg@163.com>
<20150927175608.GM295765@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Yes, I forgot disable-c-assert last test.
The following show the test result when disable-c-assert.
I think it's still worthwhile.
*After optimize code (warm run)*
postgres=# select count(*) from lineitem where l_orderkey=1;
count
-------
6
(1 row)
Time: 327.143 ms
*Before optimizing code (warm run)*
postgres=# select count(*) from lineitem where l_orderkey=1;
count
-------
6
(1 row)
Time: 404.323 ms
>>>>However I wonder if it would be simpler to have the dtup structure have
>>>>the pointers, so that you can pass it as NULL in the first call and then
>>>>followup calls reuse the one allocated in the first call.
Jinyu: the memory is allocated from perRangeCxt and perRangeCxt will be
reset in loop,
so this way don't work.
Jinyu Zhang
--
View this message in context: http://postgresql.nabble.com/Patch-Optimize-memory-allocation-in-function-bringetbitmap-tp5867537p58...
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
--
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: beijing_pg@163.com
Subject: Re: Patch: Optimize memory allocation in function 'bringetbitmap'
In-Reply-To: <1443451254826-5867647.post@n5.nabble.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