Re: New Feature Request - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: New Feature Request
Date
Msg-id 90f9435d-1e36-8ff5-ce25-4e231686a636@2ndquadrant.com
Whole thread Raw
In response to Re: New Feature Request  (Bert Scalzo <bertscalzo2@gmail.com>)
List pgsql-hackers
On 2020-05-26 12:10, Bert Scalzo wrote:
> So far QIKR shows about a 
> 2.5X improvement over the PostgreSQL optimizer when fed bad SQL. I am 
> not saying the PotsgrSQL optimizer does a poor job, but rather that 
> QIKR was designed for "garbage in, not garbage out" - so QIKR fixes all 
> the stupid mistakes that people make which can confuse or even cripple 
> an optimizer. Hence why I am looking for this hook - and have come to 
> the experts for help. I have two very large PostgreSQL partner 
> organizations who have asked me to make QIKR work for PostgreSQL as it 
> does for MySQL. Again, I am willing to pay for this hook since it's a 
> special request for a special purpose and not generally worthwhile in 
> many people's opinions - which I cannot argue with.

Your project seems entirely legitimate as a third-party optional plugin.

I think the post_parse_analyze_hook would work for this.  I suggest you 
start with it and see how far you can take it.

It may turn out that you need a hook after the rewriter, but that should 
be a small change and shouldn't affect your own code very much, since 
you'd get handed the same data structure in each case.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Bert Scalzo
Date:
Subject: Re: New Feature Request
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions