From: | Vladlen Popolitov <v(dot)popolitov(at)postgrespro(dot)ru> |
---|---|
To: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Junwang Zhao <zhjwpku(at)gmail(dot)com> |
Subject: | Re: Some ExecSeqScan optimizations |
Date: | 2025-01-10 09:53:52 |
Message-ID: | c2823723286b7dc18eb9b9896512b39e@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Amit Langote писал(а) 2025-01-10 16:22:
> On Fri, Jan 10, 2025 at 1:06 PM David Rowley <dgrowleyml(at)gmail(dot)com>
> wrote:
>> On Fri, 10 Jan 2025 at 02:46, Amit Langote <amitlangote09(at)gmail(dot)com>
>> wrote:
>> >
>> > On Mon, Jan 6, 2025 at 10:18 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>> > > I've attached my workings of what I was messing around with. It seems
>> > > to perform about the same as your version. I think maybe we'd need
>> > > some sort of execScan.h instead of where I've stuffed the functions
>> > > in.
>> >
>> > I've done that in the attached v2.
>>
>> I think 0001 looks ok, aside from what the attached fixes. (at least
>> one is my mistake)
>
> Oops, thanks for the fixes. Attaching an updated version.
>
>> Did you test the performance of 0002? I didn't look at it hard enough
>> to understand what you've done.
>
> I reran the test suite I used before and I don't see a consistent
> improvement due to 0002 or perhaps rather degradation. I've saved the
> results in the sheet named 2025-01-10 in the spreadsheet at [1].
>
> Comparing the latency for the query `select count(*) from test_table
> where <first_column> = <nonexistant_value>` (where test_table has 30
> integer columns and 1 million rows in it) between v17, master, and the
> patched (0001 or 0001+0002) shows an improvement of close to 10% with
> the patch.
>
> -- v17
> select count(*) from test_table where a_1 = 1000000;
> count
> -------
> 0
> (1 row)
> Time: 286.618 ms
>
> -- master
> select count(*) from test_table where a_1 = 1000000;
> count
> -------
> 0
> (1 row)
> Time: 283.564 ms
>
> -- patched (0001+0002)
> select count(*) from test_table where a_1 = 1000000;
> count
> -------
> 0
> (1 row)
> Time: 260.547 ms
>
> Note that I turned off Gather for these tests, because then I find
> that the improvements to ExecScan() are better measurable.
>
>> I can look if performance tests show
>> that it might be worthwhile considering.
>
> Sure, that would be great.
Hi
Could you clarify, how do you get this improvements (283 ms to 260 ms)
in this patch?
I see additional code ( if ... else if ... else if ...) and the same
function declared
as inline, but it is called by pointer as before, and it does not
matter, that it is
declared as inline.
In case of query
select count(*) from test_table where a_1 = 1000000;
I would expect increase of query time due to additional if...else . It
is not clear
what code was eliminated to decrease query time.
--
Best regards,
Vladlen Popolitov.
From | Date | Subject | |
---|---|---|---|
Next Message | Ajin Cherian | 2025-01-10 10:08:17 | Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility. |
Previous Message | Kohei Harikae (Fujitsu) | 2025-01-10 09:43:02 | RE: Windows meson build |