Re: abnormally long time in performing a two-table join

From: Chris Mungall <cjm(at)fruitfly(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: abnormally long time in performing a two-table join
Date: 2002-08-12 04:01:40
Message-ID: Pine.LNX.4.33.0208112035240.16003-100000@sos.lbl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On Sun, 11 Aug 2002, Chris Mungall wrote:

> > You might try increasing the statistics target for the qualifier_value
> > column --- I'm guessing that you need more resolution in the stats to
> > deal correctly with low-probability data. Try
> > ALTER TABLE sfqv ALTER COLUMN qualifier_value SET STATISTICS 100;
> > ANALYZE sfqv; -- to recompute stats
> > then see how the EXPLAIN results change. (The default stats target is
> > 10; 100 might be more than you need, or perhaps not.)
>
> Hmm, it still doesn't force a hash join
>
> i've included the output from the same query again, twice - first with
> nestloop disabled, then with it enabled.
>

[SNIP]

>
>
> > > however I'm not sure what the implications of turning nestloop off
> > > altogether are - maybe i can hardcode it just for this query
> >
> > It'd be best not to. I'd counsel seeing if more stats help, first.
>
> Ok, I'm going to try upping it from 100....

I tried 1000, it still insists on doing a nested loop. any other
suggestions for forcing a hash join over a nested loop?

> > regards, tom lane
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-08-12 05:50:26 Re: abnormally long time in performing a two-table join
Previous Message Curt Sampson 2002-08-12 03:30:42 Re: ProstGreSQL on RAID Question