Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux