pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgresql geqo optimization
2+ messages / 2 participants
[nested] [flat]

* postgresql geqo optimization
@ 2006-02-11 01:46  uwcssa <uwcssa@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: uwcssa @ 2006-02-11 01:46 UTC (permalink / raw)
  To: pgsql-performance

I have a question with regard to GEQO optimizer of Postgresql.

For complex queries with over 12 tables in a join, (12 is the
default value), the Postgresql optimizer by default will not use the dynamic
programming style optimizer. Instead, it uses genetic algorithm to compute a
sub-optimal query plan.  The reason is that GEQO takes sub-seconds to find a
query plan while the DP style optimizer will take minutes or even hours to
optimize a complex query with large join degree.

I am wondering if anyone here ever had complex queries that the GEQO fails
to work properly, i.e.,  finds a terrible query plan as compared to one
found by DP optimizer (by forcing Postgresql always uses DP).    This is
important to me since I am trying to see what type of queries will be worth
spending a lot of time doing a thorough DP optimization (if it is going to
be executed again and again).

thanks a lot!

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

* Re: postgresql geqo optimization
@ 2006-02-11 01:52  Steinar H. Gunderson <sgunderson@bigfoot.com>
  parent: uwcssa <uwcssa@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Steinar H. Gunderson @ 2006-02-11 01:52 UTC (permalink / raw)
  To: uwcssa <uwcssa@gmail.com>; +Cc: pgsql-performance

On Fri, Feb 10, 2006 at 08:46:14PM -0500, uwcssa wrote:
> I am wondering if anyone here ever had complex queries that the GEQO fails
> to work properly, i.e.,  finds a terrible query plan as compared to one
> found by DP optimizer (by forcing Postgresql always uses DP).    This is
> important to me since I am trying to see what type of queries will be worth
> spending a lot of time doing a thorough DP optimization (if it is going to
> be executed again and again).

There have been a few problems earlier on this list which might have been the
geqo's fault; search the list archives for "geqo" or "genetic", and you
should be able to find them quite easily.

/* Steinar */
-- 
Homepage: http://www.sesse.net/



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


end of thread, other threads:[~2006-02-11 01:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-11 01:46 postgresql geqo optimization uwcssa <uwcssa@gmail.com>
2006-02-11 01:52 ` Steinar H. Gunderson <sgunderson@bigfoot.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