Re: [HACKERS] Proposal: Pluggable Optimizer Interface

From: Julius Stroffek <Julius(dot)Stroffek(at)Sun(dot)COM>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Proposal: Pluggable Optimizer Interface
Date: 2007-08-13 21:27:56
Message-ID: 46C0CCDC.7070906@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Stefan,

thanks for pointing this out. I missed this change.

We would like to place the hooks to a different place in the planner and
we would like to just replace the non-deterministic algorithm searching
for the best order of joins and keep the rest of the planner untouched.

I am not quite sure about the usage from the user point of view of what
got implemented. I read just the code of the patch. Are there more
explanations somewhere else?

I understood that if the user creates his own implementation of the
planner which can be stored in some external library, he have to provide
some C language function as a "hook activator" which will assign the
desired value to the planner_hook variable. Both, the activator function
and the new planner implementation have to be located in the same
dynamic library which will be loaded when CREATE FUNCTION statement
would be used on "hook activator" function.

Am I correct? Have I missed something?

If the above is the case than it is exactly what we wanted except we
would like to have the hook also in the different place.

There are more things in the proposal as a new pg_optimizer catalog and
different way of configuring the hooks. However, this thinks are not
mandatory for the functionality but are more user friendly.

Thanks

Julo

Stefan Kaltenbrunner wrote:
> Julius Stroffek wrote:
>
>> Hi All,
>>
>> Tomas Kovarik and I have presented at PGCon 2007 in Ottawa
>> the ideas about other possible optimizer algorithms to be used
>> in PostgreSQL.
>>
>> We are quite new to PostgreSQL project so it took us some
>> time to go through the sources end explore the possibilities
>> how things could be implemented.
>>
>> There is a proposal attached to this mail about the interface
>> we would like to implement for switching between different
>> optimizers. Please review it and provide a feedback to us.
>> Thank You.
>>
>
> hmm - how does is that proposal different from what got implemented with:
>
> http://archives.postgresql.org/pgsql-committers/2007-05/msg00315.php
>
>
> Stefan
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-08-13 22:24:27 Re: [HACKERS] Proposal: Pluggable Optimizer Interface
Previous Message Tom Lane 2007-08-13 21:23:23 Re: [HACKERS] Proposal: Pluggable Optimizer Interface

Browse pgsql-performance by date

  From Date Subject
Next Message Jim Nasby 2007-08-13 22:17:16 Re: Performance on writable views
Previous Message Kevin Grittner 2007-08-13 21:25:49 Re: Help optimize view