Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Jinyu Zhang <beijing_pg(at)163(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'
Date: 2015-09-28 14:07:02
Message-ID: CANP8+jKX2xy3Cx0VGiM_vRx8sms4MWW-s-atZXCduJdKdPUrGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27 September 2015 at 02:15, Jinyu Zhang <beijing_pg(at)163(dot)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/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marti Raudsepp 2015-09-28 14:17:30 [PATCH] Skip ALTER x SET SCHEMA if the schema didn't change
Previous Message Paul Ramsey 2015-09-28 13:47:49 Re: [PATCH] postgres_fdw extension support