Re: BUG #17560: Planner can not find plan with lowest cost

Поиск
Список
Период
Сортировка
От Stanisław Skonieczny
Тема Re: BUG #17560: Planner can not find plan with lowest cost
Дата
Msg-id CADp+y_GKjB3mx9DMNxzjniNoShZqZs1o62zPxLMH9DMB5ngL3w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17560: Planner can not find plan with lowest cost  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-bugs


On Fri, Jul 29, 2022 at 9:31 AM Francisco Olarte <folarte@peoplecall.com> wrote:
Stanislaw:

On Thu, 28 Jul 2022 at 20:57, PG Bug reporting form
<noreply@postgresql.org> wrote:

> create table ss_temp_table1 as select id, v1, v2 from ss_d order by id desc
> limit 100000;
...
>         FROM ss_d AS d
>         JOIN ss_temp_table1 AS t1 ON t1.id = d.id AND t1.v1 = d.v1 AND t1.v2
> = d.v2

Do your real tables/queries have the same kind of redudant condition (
i.e., "AND t1.v1 = d.v1 AND t1.v2" is redundant due to id being a "PK"
)?


It is not redundant. There might be rows in ss_d and ss_temp_table1 that have same id, but different v1, v2 values and this join should reject it, however usually that is a minority.
 
Francisco Olarte.


Stanisław Skonieczny
 

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

Предыдущее
От: Laetitia Avrot
Дата:
Сообщение: Re: Statistics updates is delayed when using `commit and chain`
Следующее
От: Richard Guo
Дата:
Сообщение: Re: Re[2]: BUG #17561: Server crashes on executing row() with very long argument list