Re: Table order at FROM clause affects performance?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Table order at FROM clause affects performance?
Дата
Msg-id 12796.1523547028@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Table order at FROM clause affects performance?  (Eduard Català <eduard.catala@gmail.com>)
Ответы Re: Table order at FROM clause affects performance?  (Eduard Català <eduard.catala@gmail.com>)
Список pgsql-performance
=?UTF-8?Q?Eduard_Catal=C3=A0?= <eduard.catala@gmail.com> writes:
> Given this statement:

> SELECT *several_fields*  FROM A, B, C WHERE  *conditions*
> A, B are tables with several LEFT JOINS but they act as one subquery.

You really can't expect useful help if you are going to pose questions
that abstract.  You have removed details that count, and made assumptions
that don't necessarily hold (e.g., what does "act as one subquery" mean?)

Probably the most likely bet, on this limited information, is that there
are enough base tables hidden inside your query that you're running into
join_collapse_limit and/or from_collapse_limit, resulting in the planner
failing to investigate the best available plan in one case.  Raising those
limits would help, if so.  But it could easily be something else.

There's some suggestions here about how to ask useful questions:

https://wiki.postgresql.org/wiki/Slow_Query_Questions

            regards, tom lane


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

Предыдущее
От: Eduard Català
Дата:
Сообщение: Table order at FROM clause affects performance?
Следующее
От: Eduard Català
Дата:
Сообщение: Re: Table order at FROM clause affects performance?