Re: [BUGS] BUG #14746: sub query's plan not right?

Поиск
Список
Период
Сортировка
От Feike Steenbergen
Тема Re: [BUGS] BUG #14746: sub query's plan not right?
Дата
Msg-id CAK_s-G1uKcq84DHKPJ11+N3xfVX9qS9=4McF8UtM+Ox0rF9qVg@mail.gmail.com
обсуждение исходный текст
Ответ на [BUGS] BUG #14746: sub query's plan not right?  (digoal@126.com)
Список pgsql-bugs
> is this a bug ? or it can be improved?

Perhaps, for me it rings a bell of using OFFSET 0 as a hack, that at least has
the property of not changing the logic of your query:

select (t.b).aid,(t.b).val,(t.b).crt_time
from
(
  select
    (
      select b from b
        where b.aid=a.id
        order by crt_time desc limit 1
    )
  from a offset 0
) t
where (t.b).aid is not null;

Previous similar discussion:


Some other pointers:

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [BUGS] BUG #14759: insert into foreign data partitions fail
Следующее
От: Rick Otten
Дата:
Сообщение: [BUGS] signal 11 segfaults with parallel workers