NYCPHP Meetup

NYPHP.org

[nycphp-talk] database performance

Dan Cech dcech at phpwerx.net
Fri Oct 21 11:56:39 EDT 2005


I wrote a hybrid system based off a nested set idea but also storing the 
parent_id for phpGACL (http://phpgacl.sourceforge.net/).  It works very 
well, scales great and can easily be rebuilt if there is an error in the 
lft,rgt pairs.

The same idea powered this little demo, which some of you may remember.

http://clew.phpwerx.net/

Dan

Cliff Hirsch wrote:
> I have implemented this structure, but have added several fields. For
> starters, I keep the id, parent id relationship because it seems handy
> at times, and then add a tree level/depth field. This makes updates a
> bit more complex, but if you are mainly performing various sorts of
> reads, I think it makes things faster and presentation a bit easier.
> 
> Cliff Hirsch
> 
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
> On Behalf Of David Mintz
> Sent: Friday, October 21, 2005 9:15 AM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] database performance
> 
> 
> On Thu, 20 Oct 2005, Roland Cozzolino wrote:
> 
> http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=12662
> 95.
> 
> Utterly cool. Now, if only they would add a Flash animation that shows
> the
> tree morphing into an oval containing lots of nested ovals, and a worm
> traversing it...
> 
> ---
> David Mintz
> http://davidmintz.org/



More information about the talk mailing list