Re: About connectby() - Mailing list pgsql-hackers

From Joe Conway
Subject Re: About connectby()
Date
Msg-id 3D7A388F.3020800@joeconway.com
Whole thread Raw
In response to About connectby()  (Masaru Sugawara <rk73@sea.plala.or.jp>)
List pgsql-hackers
David Walker wrote:
> I prefer the max depth method.  Every tree I am aware of has a maximum usable 
> depth.
> 
> This should never be a problem in trees where keyid is unique.
> 

I just sent in a patch using the ancestor check method. It turned out 
that the performance hit was pretty small on a moderate sized tree.

My test case was a 220000 record bill-of-material table. The tree built 
was 9 levels deep with about 3800 nodes. The performance hit was only 
about 1%.

Are there cases where infinite recursion to some max depth *should* be 
allowed? I couldn't think of any. If a max depth was imposed, what 
should it be?

Joe



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: About connectby()
Next
From: snpe
Date:
Subject: Re: [JDBC] problem with new autocommit config parameter and jdbc