Re: join ordering via Simulated Annealing

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Jan Urbański <wulczer(at)wulczer(dot)org>
Subject: Re: join ordering via Simulated Annealing
Date: 2009-12-26 16:30:54
Message-ID: 200912261730.54730.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 23 December 2009 02:23:55 Jan Urbański wrote:
> Hi,
>
> I've been playing with using a Simulated Annealing-type algorithm for
> determinig join ordering for relations.
Very cool.

> Lastly, I'm lacking good testcases or even a testing approach: I'm
> generating silly queries and looking at how they get optimised, but if
> someone has a real dataset and examples of joins that cannot be planned
> with the standard planner, I would be interested to compare the results
> my prototype gets with those produced by GEQO.
If you want to see some queries which are rather hard to plan with random
search you can look at
http://archives.postgresql.org/message-
id/200907091700(dot)43411(dot)andres(at)anarazel(dot)de
which tom analyzed and improved here http://archives.postgresql.org/message-
id/17807(dot)1247932094(at)sss(dot)pgh(dot)pa(dot)us

They are hard to plan because they have lots and lots of join order
restrictions. While this example is rather extreme I have found quite many
such queries so far.

Robert had another example in
603c8f070911271205r4d4534edt1cebcb76ff5066a5(at)mail(dot)gmail(dot)com that might be
interesting.

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-12-26 16:55:45 Re: Removing pg_migrator limitations
Previous Message Robert Haas 2009-12-26 08:53:17 parse_oper cache