Re: Some ExecSeqScan optimizations

2025-01-21 Thread Amit Langote
On Fri, Jan 17, 2025 at 2:05 PM Amit Langote wrote: > Here's v5 with a few commit message tweaks. > > Barring objections, I would like to push this early next week. Pushed yesterday. Thank you all. -- Thanks, Amit Langote

Re: Some ExecSeqScan optimizations

2025-01-16 Thread Amit Langote
Here's v5 with a few commit message tweaks. Barring objections, I would like to push this early next week. -- Thanks, Amit Langote v5-0001-Refactor-ExecScan-to-allow-inlining-of-its-core-l.patch Description: Binary data

Re: Some ExecSeqScan optimizations

2025-01-13 Thread Amit Langote
Hi Junwang, On Sat, Jan 11, 2025 at 7:39 PM Junwang Zhao wrote: > Hi Amit, > > On Fri, Jan 10, 2025 at 7:22 PM Amit Langote wrote: > > > > On Fri, Jan 10, 2025 at 7:36 PM David Rowley wrote: > > > On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov > > > wrote: > > > > In case of query > > > > s

Re: Some ExecSeqScan optimizations

2025-01-13 Thread Amit Langote
Hi Vladlen, On Fri, Jan 10, 2025 at 11:49 PM Vladlen Popolitov wrote: > Amit Langote писал(а) 2025-01-10 18:22: > > On Fri, Jan 10, 2025 at 7:36 PM David Rowley > > wrote: > >> On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov > >> wrote: > >> > In case of query > >> > select count(*) from test

Re: Some ExecSeqScan optimizations

2025-01-11 Thread Junwang Zhao
Hi Amit, On Fri, Jan 10, 2025 at 7:22 PM Amit Langote wrote: > > On Fri, Jan 10, 2025 at 7:36 PM David Rowley wrote: > > On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov > > wrote: > > > In case of query > > > select count(*) from test_table where a_1 = 100; > > > I would expect increase o

Re: Some ExecSeqScan optimizations

2025-01-11 Thread Junwang Zhao
On Sat, Jan 11, 2025 at 4:57 PM Junwang Zhao wrote: > > On Fri, Jan 10, 2025 at 10:49 PM Vladlen Popolitov > wrote: > > > > Amit Langote писал(а) 2025-01-10 18:22: > > > On Fri, Jan 10, 2025 at 7:36 PM David Rowley > > > wrote: > > >> On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov > > >> wrote

Re: Some ExecSeqScan optimizations

2025-01-11 Thread Junwang Zhao
On Fri, Jan 10, 2025 at 10:49 PM Vladlen Popolitov wrote: > > Amit Langote писал(а) 2025-01-10 18:22: > > On Fri, Jan 10, 2025 at 7:36 PM David Rowley > > wrote: > >> On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov > >> wrote: > >> > In case of query > >> > select count(*) from test_table wher

Re: Some ExecSeqScan optimizations

2025-01-10 Thread Vladlen Popolitov
Amit Langote писал(а) 2025-01-10 18:22: On Fri, Jan 10, 2025 at 7:36 PM David Rowley wrote: On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov wrote: > In case of query > select count(*) from test_table where a_1 = 100; > I would expect increase of query time due to additional if...else . I

Re: Some ExecSeqScan optimizations

2025-01-10 Thread Amit Langote
On Fri, Jan 10, 2025 at 7:36 PM David Rowley wrote: > On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov > wrote: > > In case of query > > select count(*) from test_table where a_1 = 100; > > I would expect increase of query time due to additional if...else . It > > is not clear > > what code

Re: Some ExecSeqScan optimizations

2025-01-10 Thread David Rowley
On Fri, 10 Jan 2025 at 22:22, Amit Langote wrote: > > On Fri, Jan 10, 2025 at 1:06 PM David Rowley wrote: > > I can look if performance tests show > > that it might be worthwhile considering. > > Sure, that would be great. What I wanted to know was if 0002 shows any additional gains over just 00

Re: Some ExecSeqScan optimizations

2025-01-10 Thread David Rowley
On Fri, 10 Jan 2025 at 22:53, Vladlen Popolitov wrote: > In case of query > select count(*) from test_table where a_1 = 100; > I would expect increase of query time due to additional if...else . It > is not clear > what code was eliminated to decrease query time. Are you talking about the c

Re: Some ExecSeqScan optimizations

2025-01-10 Thread Vladlen Popolitov
Amit Langote писал(а) 2025-01-10 16:22: On Fri, Jan 10, 2025 at 1:06 PM David Rowley wrote: On Fri, 10 Jan 2025 at 02:46, Amit Langote wrote: > > On Mon, Jan 6, 2025 at 10:18 PM David Rowley wrote: > > I've attached my workings of what I was messing around with. It seems > > to perform about

Re: Some ExecSeqScan optimizations

2025-01-10 Thread Amit Langote
On Fri, Jan 10, 2025 at 1:06 PM David Rowley wrote: > On Fri, 10 Jan 2025 at 02:46, Amit Langote wrote: > > > > On Mon, Jan 6, 2025 at 10:18 PM David Rowley 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

Re: Some ExecSeqScan optimizations

2025-01-09 Thread David Rowley
On Fri, 10 Jan 2025 at 02:46, Amit Langote wrote: > > On Mon, Jan 6, 2025 at 10:18 PM David Rowley 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

Re: Some ExecSeqScan optimizations

2025-01-09 Thread Amit Langote
On Mon, Jan 6, 2025 at 10:18 PM David Rowley wrote: > On Sat, 21 Dec 2024 at 00:41, Amit Langote wrote: > > To address (1), I tried assigning specialized functions to > > PlanState.ExecProcNode in ExecInitSeqScan() based on whether qual or > > projInfo are NULL. Inspired by David Rowley’s suggest

Re: Some ExecSeqScan optimizations

2025-01-06 Thread David Rowley
On Sat, 21 Dec 2024 at 00:41, Amit Langote wrote: > To address (1), I tried assigning specialized functions to > PlanState.ExecProcNode in ExecInitSeqScan() based on whether qual or > projInfo are NULL. Inspired by David Rowley’s suggestion to look at > ExecHashJoinImpl(), I wrote variants like Ex

Some ExecSeqScan optimizations

2024-12-20 Thread Amit Langote
Hi, I’ve been looking into possible optimizations for ExecSeqScan() and chatting with colleagues about cases where it shows up prominently in analytics-style query plans. For example, in queries like SELECT agg(somecol) FROM big_table WHERE , ExecScan() often dominates the profile. Digging into i