Re: [GENERAL] recursive query too big to complete. are there any strategies to limit/partition?

Поиск
Список
Период
Сортировка
От Jonathan Vanasco
Тема Re: [GENERAL] recursive query too big to complete. are there any strategies to limit/partition?
Дата
Msg-id F8FA8713-F8AB-4AEB-8E14-664D8A2C01C2@2xlp.com
обсуждение исходный текст
Ответ на Re: [GENERAL] recursive query too big to complete. are there anystrategies to limit/partition?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general

On Jan 26, 2017, at 7:07 PM, David G. Johnston wrote:

​Thinking aloud - why doesn't just finding every record with 5 descendants not work?  Any chain longer than 5 would have at least 5 items.

Oh it works. This is why I ask these questions -- new perspectives!

​Even without recursion you could build out a five-way self-join and any records that make it that far are guilty.  I suppose this assumes your setup is non-cyclic.

There could be cyclic records, but that's easy to filter out.  A first approach took 40 seconds to run.  A little tweaking is necessary, but this is a great start.

THANK YOU!  You saved me!

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] recursive query too big to complete. are there anystrategies to limit/partition?
Следующее
От: Göran Hasse
Дата:
Сообщение: [GENERAL] Postgres ODBC on Windows 10