Lists: | pgsql-hackers |
---|
From: | Pei He <hepeimail(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | How to construct an exact plan |
Date: | 2010-08-30 17:34:35 |
Message-ID: | AANLkTin3xtEi535ZxHo59BZatNfKuLhOP8tJgbUzNxxZ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
I have developed a new operators, and I want to do some tests on it.
I do not want the optimizer to choose the plan for me, and I need to
construct a plan as exact as I want.
Can anyone provide me a way to achieve that?
Thanks
--
Pei
From: | Pei He <hepeimail(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to construct an exact plan |
Date: | 2010-08-30 17:39:09 |
Message-ID: | AANLkTi=0UsHEh7V-+9SXOk8Ugz=301Z+30NTg_Rvt6WJ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I forgot to mention that I am using postgresql 8.2.5.
Thanks
--
Pei
On Mon, Aug 30, 2010 at 1:34 PM, Pei He <hepeimail(at)gmail(dot)com> wrote:
> Hi,
> I have developed a new operators, and I want to do some tests on it.
> I do not want the optimizer to choose the plan for me, and I need to
> construct a plan as exact as I want.
>
> Can anyone provide me a way to achieve that?
>
> Thanks
> --
> Pei
>
From: | Pei He <hepeimail(at)gmail(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to construct an exact plan |
Date: | 2010-08-30 19:22:31 |
Message-ID: | AANLkTimrvBLz+-JF=wKy4tMvuWSsfObuYqQVDGMabb=5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
I am hacking postgresql 8.2.5. a) and b) do not work for me.
The situation is that I made a join operator, and a scan operator.
And, The join operator requires the scan operator as the inner. So, I
need to have the full control of the join plan.
I am not ready to provide the optimization support for the two new
operators. And, I want to run some performance tests before working on
the optimization part.
So, I want to know if it is possible to directly create a path or a
plan, and do a unit test for the operators.
Thanks
--
Pei
On Mon, Aug 30, 2010 at 1:59 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>
>> I have developed a new operators, and I want to do some tests on it.
>> I do not want the optimizer to choose the plan for me, and I need to
>> construct a plan as exact as I want.
>>
>> Can anyone provide me a way to achieve that?
>
> a) easy: choose a simple enough query that its plan is always predictable.
>
> b) moderate: choose a query whose plan is predictable if you manipulate
> the enable_* configuration settings
>
> c) hard: hack the PostgreSQL planner to choose a specific execution
> plan, and recompile Postgres.
>
> --
> -- Josh Berkus
> PostgreSQL Experts Inc.
> http://www.pgexperts.com
>
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Pei He <hepeimail(at)gmail(dot)com> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to construct an exact plan |
Date: | 2010-08-30 19:41:50 |
Message-ID: | AANLkTikxfZv6k-odG3F-Y9iOyTzH96yr5THnsy5hjkJF@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2010/8/30 Pei He <hepeimail(at)gmail(dot)com>:
> Hi,
> I am hacking postgresql 8.2.5. a) and b) do not work for me.
>
> The situation is that I made a join operator, and a scan operator.
> And, The join operator requires the scan operator as the inner. So, I
> need to have the full control of the join plan.
>
> I am not ready to provide the optimization support for the two new
> operators. And, I want to run some performance tests before working on
> the optimization part.
>
> So, I want to know if it is possible to directly create a path or a
> plan, and do a unit test for the operators.
>
yes, it is possible - but it isn't simple. I thing, so better is
simple implementation of all parts and then runtime blocking some (for
you not interesting) buildin methods via SET enable_.... to off.
Regards
Pavel Stehule
>
> Thanks
> --
> Pei
>
> On Mon, Aug 30, 2010 at 1:59 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>
>>> I have developed a new operators, and I want to do some tests on it.
>>> I do not want the optimizer to choose the plan for me, and I need to
>>> construct a plan as exact as I want.
>>>
>>> Can anyone provide me a way to achieve that?
>>
>> a) easy: choose a simple enough query that its plan is always predictable.
>>
>> b) moderate: choose a query whose plan is predictable if you manipulate
>> the enable_* configuration settings
>>
>> c) hard: hack the PostgreSQL planner to choose a specific execution
>> plan, and recompile Postgres.
>>
>> --
>> -- Josh Berkus
>> PostgreSQL Experts Inc.
>> http://www.pgexperts.com
>>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
From: | PostgreSQL - Hans-Jürgen Schönig <postgres(at)cybertec(dot)at> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Pei He <hepeimail(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to construct an exact plan |
Date: | 2010-08-31 07:10:25 |
Message-ID: | D5D77B72-D369-496B-B8BE-1508088C4A07@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
hello ...
here is the ultimate revelation of planner hints in postgres ...
let us praise oleg and teodor for solving a practical problem for practical people ...
http://www.sai.msu.su/~megera/wiki/plantuner
try this one ...
it is excellent and definitely helpful for many many people out there.
unfortunately this code is not too well known.
many thanks,
hans
On Aug 30, 2010, at 9:41 PM, Pavel Stehule wrote:
> 2010/8/30 Pei He <hepeimail(at)gmail(dot)com>:
>> Hi,
>> I am hacking postgresql 8.2.5. a) and b) do not work for me.
>>
>> The situation is that I made a join operator, and a scan operator.
>> And, The join operator requires the scan operator as the inner. So, I
>> need to have the full control of the join plan.
>>
>> I am not ready to provide the optimization support for the two new
>> operators. And, I want to run some performance tests before working on
>> the optimization part.
>>
>> So, I want to know if it is possible to directly create a path or a
>> plan, and do a unit test for the operators.
>>
>
> yes, it is possible - but it isn't simple. I thing, so better is
> simple implementation of all parts and then runtime blocking some (for
> you not interesting) buildin methods via SET enable_.... to off.
>
> Regards
>
> Pavel Stehule
>
>>
>> Thanks
>> --
>> Pei
>>
>> On Mon, Aug 30, 2010 at 1:59 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>>
>>>> I have developed a new operators, and I want to do some tests on it.
>>>> I do not want the optimizer to choose the plan for me, and I need to
>>>> construct a plan as exact as I want.
>>>>
>>>> Can anyone provide me a way to achieve that?
>>>
>>> a) easy: choose a simple enough query that its plan is always predictable.
>>>
>>> b) moderate: choose a query whose plan is predictable if you manipulate
>>> the enable_* configuration settings
>>>
>>> c) hard: hack the PostgreSQL planner to choose a specific execution
>>> plan, and recompile Postgres.
>>>
>>> --
>>> -- Josh Berkus
>>> PostgreSQL Experts Inc.
>>> http://www.pgexperts.com
>>>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de