Re: trees, trees, trees

From: geos <geos_at_nowhere.invalid>
Date: Thu, 21 Jun 2012 22:51:58 +0200
Message-ID: <js01hp$u4o$1_at_news.task.gda.pl>



Gerard H. Pille wrote:
> I've been keeping both my eyes on performance in programming for over 35
> years now. Of course, I can only do as much as your design allows.
> Given the correct indexing, tree walks can be performant enough. You
> wouldn't want me to write the select statement for you, would you?

sure I would. why wouln't ask for more explicit help when struggling with the problem for some time? writing a statement that can be analyzed is great help too, especially a query from someone with such big experience compared to mine. the information about hierarchical queries was obvious from the beginning.

anyway, if you would like to help here is a complete script that fills table with sample data and expected result:

http://geos2005.republika.pl/table.sql
http://geos2005.republika.pl/result.jpg

GRP column in the table is just helpful for spotting a groups of records but it can not be used in a query. generally the entries in the table are edges of a graph, can be many nodes in a graph, can be connected in any way between each other allowing loops.

thank you,
geos Received on Thu Jun 21 2012 - 15:51:58 CDT

Original text of this message