Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap' - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'
Date
Msg-id CANP8+jKX2xy3Cx0VGiM_vRx8sms4MWW-s-atZXCduJdKdPUrGw@mail.gmail.com
Whole thread Raw
In response to BRIN Scan: Optimize memory allocation in function 'bringetbitmap'  ("Jinyu Zhang" <beijing_pg@163.com>)
Responses Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'  (zhangjinyu <beijing_pg@163.com>)
Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'  (zhangjinyu <beijing_pg@163.com>)
List pgsql-hackers
On 27 September 2015 at 02:15, Jinyu Zhang <beijing_pg@163.com> wrote:

BRIN Scan: Optimize memory allocation in function 'bringetbitmap'.
We can allocate memory for some pointer before do long loop instead of allocating
memory in long loop.

Before optimizing code (warm run)
postgres=# select count(*) from lineitem where l_orderkey=1;
 count
-------
     6
(1 row)

Time: 456.219 ms

After optimizing code (warm run)
postgres=# select count(*) from lineitem where l_orderkey=1;
 count
-------
     6
(1 row)

Time: 349.219 ms

Patch?
 
--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Paul Ramsey
Date:
Subject: Re: [PATCH] postgres_fdw extension support
Next
From: Marti Raudsepp
Date:
Subject: [PATCH] Skip ALTER x SET SCHEMA if the schema didn't change