Re: Solving sudoku using SQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Solving sudoku using SQL
Дата
Msg-id 17547.1291830345@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Solving sudoku using SQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Solving sudoku using SQL  (Jan Urbański <wulczer@wulczer.org>)
Список pgsql-hackers
I wrote:
> There is something funny going on there; it's not just that the planner
> is slower with a large flat search space.  It is slower, but only maybe
> 5x or so.  What I'm seeing is that it actually finds a much worse plan
> (very much larger estimated cost as well as actual runtime) when given
> the flat problem.  That seems like a bug: a constrained search ought
> never find a better solution than an unconstrained search.

Oh, wait: the problem of course is that it's switching into GEQO mode
and hence *not* doing a complete search.  Doh.  If you turn GEQO off
then planning takes ~ forever with the flat version of the query.

We could "fix" that by forcibly breaking up the search problem in the
same fashion that join_collapse_limit does, but I'm sure we'd get
complaints about that approach.

The real fix in my mind is to replace GEQO search with something
smarter.  I wonder what happened to the SA patch that was reported
on at PGCon.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Solving sudoku using SQL
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: Solving sudoku using SQL