pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Plannner favoring nested loop
3+ messages / 2 participants
[nested] [flat]

* Plannner favoring nested loop
@ 2007-05-07 20:33 Abu Mushayeed <abumushayeed@yahoo.com>
  2007-05-07 21:37 ` Re: Plannner favoring nested loop Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Abu Mushayeed @ 2007-05-07 20:33 UTC (permalink / raw)
  To: pgsql-admin

Hello,
   
  I am trying to determine if I can make the planner see that nested loop is very expensive while it is trying to do an plan for a query and not pick that route. 
   
  Is there a way to this in postgres? I know about the "set enable..." commands. I was wondering if I can do it without the hints.
   
  Thanks
  Abu

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Plannner favoring nested loop
  2007-05-07 20:33 Plannner favoring nested loop Abu Mushayeed <abumushayeed@yahoo.com>
@ 2007-05-07 21:37 ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-05-07 22:30   ` Re: Plannner favoring nested loop Abu Mushayeed <abumushayeed@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2007-05-07 21:37 UTC (permalink / raw)
  To: Abu Mushayeed <abumushayeed@yahoo.com>; +Cc: pgsql-admin

Abu Mushayeed <abumushayeed@yahoo.com> writes:
>   I am trying to determine if I can make the planner see that nested loop is very expensive while it is trying to do an plan for a query and not pick that route. 

If it's doing that when it shouldn't, it's probably because it's
underestimated the number of rows in the outer relation.  Look to your
stats settings.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Plannner favoring nested loop
  2007-05-07 20:33 Plannner favoring nested loop Abu Mushayeed <abumushayeed@yahoo.com>
  2007-05-07 21:37 ` Re: Plannner favoring nested loop Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-05-07 22:30   ` Abu Mushayeed <abumushayeed@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Abu Mushayeed @ 2007-05-07 22:30 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

My default_statistics_target in the postgresql.conf file is set at 250. The tables are vacuumed everyday. Now, does that mean, for each column or only for the column on which index exist, increase the value of "statistics" value, so while analyzing it uses more rows in the sample.

  Thanks
  Abu
Tom Lane <tgl@sss.pgh.pa.us> wrote:
  Abu Mushayeed writes:
> I am trying to determine if I can make the planner see that nested loop is very expensive while it is trying to do an plan for a query and not pick that route. 

If it's doing that when it shouldn't, it's probably because it's
underestimated the number of rows in the outer relation. Look to your
stats settings.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-05-07 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-07 20:33 Plannner favoring nested loop Abu Mushayeed <abumushayeed@yahoo.com>
2007-05-07 21:37 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-05-07 22:30   ` Abu Mushayeed <abumushayeed@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox