Theoretically speaking any recursive process can be rewritten
iteratively and vice versa with no performance difference. Although,
some processes are significantly easier to write one way or the other.

Matt Liotta
President & CEO
Montara Software, Inc.
http://www.montarasoftware.com/
V: 415-577-8070
F: 415-341-8906
P: [EMAIL PROTECTED]

> -----Original Message-----
> From: Shawn Grover [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 11:54 AM
> To: CF-Talk
> Subject: RE: Recursive queries
> 
> I would think that recursion is the best choice when needing to get a
path
> through a tree structure.
> Any other methods I've seen (but I'm sure I haven't seen them all),
either
> need to loop much more times than a recursive call would, or results
in
> more
> database hits (kind of a mute point if it's happening completely in a
> stored
> proc).
> 
> My thoughts.
> 
> Shawn Grover
> 
> -----Original Message-----
> From: Justin Greene [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 12:10 PM
> To: CF-Talk
> Subject: RE: Recursive queries
> 
> 
> There is an example in the SQL Server book on-line on how to do this.
I
> do
> not remember where, but it does not use recursion.  Recursion is very
cool
> (I happen to love it) but is not terribly efficient, probably why LISP
> never
> caught on.
> 
> Justin
> 
> > -----Original Message-----
> > From: chris.alvarado [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 16, 2002 11:37 AM
> > To: CF-Talk
> > Subject: Recursive queries
> >
> > Still trying to decide how I like to perform some type of recursive
> > query wth the following Table structure;
> >
> > ID   NAME   PARENT_ID
> >
> > If the current record IS the parent then the Parent ID is 0
> >
> > Otherwise the child has the ID of the parent as it's Parent ID.
> >
> >
> > Anyone have any good references on recursive queries to handle this?
A
> > way to spider down through the parents and children basically.
> >
> > Ive done this before using Stored Procs and temp tables, but there
has
> > to be an easier way.
> >
> > Any suggestions?
> >
> >
> > -chris.alvarado
> > [ application developer ]
> > 4 Guys Interactive, Inc.
> > http://www.4guys.com
> >
> > -- I can picture in my mind a world without war, a world without
hate.
> > And I can picture us attacking that world, because they'd never
expect
> > it. -- Jack Handy
> >
> >
> >
> 
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to