Re: enforcing a join type

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: enforcing a join type
Дата
Msg-id 1091662912.27166.151.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: enforcing a join type  ("Hicham G. Elmongui" <elmongui@cs.purdue.edu>)
Ответы Re: enforcing a join type  ("Hicham G. Elmongui" <elmongui@cs.purdue.edu>)
Список pgsql-hackers
As this is not really a hacking issue, I'm moving it out of hackers and
into general.  Please post all replies there not in hackers.

Anyway, I'm afraid I'd have to ask WHY you're trying to just disable
it?  Is the query planner making the wrong decision with good
statistics, or are you getting bad statistics?

Can you post an explain analyze of the query(s) that are making you want
to make this change?  Just turning off a join method isn't the way to
fix PostgreSQL, getting it to pick the right one is.

On Wed, 2004-08-04 at 17:26, Hicham G. Elmongui wrote:
> I didn't mean about doing this from a front end. I want to disable
> nested_loop and hash_join from the backend.
> I tried to set the variables (enable_nestloop and enable_hashjoin) in
> costsize.c, but this didn't do it.
> Thanks,
> --h
>
>
>
>
> -----Original Message-----
> From: Scott Marlowe [mailto:smarlowe@qwest.net]
> Sent: Wednesday, August 04, 2004 5:41 PM
> To: Hicham G. Elmongui
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] enforcing a join type
>
> On Wed, 2004-08-04 at 14:53, Hicham G. Elmongui wrote:
> > Hi,
> > If I want the planner/optimizer to always choose merge join when it needs
> to
> > join relations. How can I do it ?
>
> >From my past experience, I'd guess what you're really trying to do is
> STOP the planner from choosing a nested_loop join, in which case it's
> quite easy:
>
> set enable_nestloop = off;
> select * from ...
>
> Of course, you could apply the same basic trick to all other join
> methods, and postgresql would then favor using the merge join.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hicham G. Elmongui"
Дата:
Сообщение: Re: enforcing a join type
Следующее
От: "Hicham G. Elmongui"
Дата:
Сообщение: Re: enforcing a join type