Re: [GENERAL] Re: [SQL] bad select performance fixed by forbidding hash joins - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] Re: [SQL] bad select performance fixed by forbidding hash joins
Date
Msg-id 199907211757.NAA08306@candle.pha.pa.us
Whole thread Raw
In response to Re: [SQL] bad select performance fixed by forbidding hash joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> George Young <gry@ll.mit.edu> writes:
> > Yes!  PGOPTIONS="-fh" made the query time go from 16 seconds to 2 seconds!
> > Is this a safe thing to leave on permanently, or is there some way to set
> > PGOPTIONS for just this query?
>
> I wouldn't recommend leaving it on as a long-term solution, because
> you're hobbling the system for cases where hashjoin *is* the best
> method.  AFAIK there is not a SET VARIABLE method for enabling/disabling
> plan types on-the-fly, though perhaps one should be added.

Postgres does have options to prohibit certain join types, so you could
try forcing a certain join type and see what happens.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: "Hub.Org News Admin"
Date:
Subject: ...
Next
From: Leon
Date:
Subject: Re: [GENERAL] Re: [SQL] bad select performance fixed by forbidding hash joins