X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 10DEDD1BA44 for ; Sat, 6 Sep 2003 05:02:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 10741-05 for ; Sat, 6 Sep 2003 02:02:20 -0300 (ADT) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id 41C76D1B56C for ; Sat, 6 Sep 2003 02:02:19 -0300 (ADT) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id E8026914FC for ; Sat, 6 Sep 2003 09:02:17 +0400 (MSD) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.33]) by rock.spider.ru (Postfix) with ESMTP id 9DE5F91449 for ; Sat, 6 Sep 2003 09:02:17 +0400 (MSD) Content-Type: text/plain; charset="iso-8859-1" From: sad Organization: IT To: "Pgsql-Sql" Subject: Re: recursive sql Date: Sat, 6 Sep 2003 09:05:02 +0400 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200309060905.02921.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/35 X-Sequence-Number: 15013 Good day On Friday 05 September 2003 21:41, you wrote: > can anyone recommend a good reference source for doing recursive sql on > postgresql? i want to do something similar to a BOM expansion. (i.e. i ne= ed > to traverse a self-referencing table that stores a tree structure and > answer a question like "Get me A and all of A's descendents") "recursive queries" are much slower than queries to a nested-tree. please find something readable on subject "nested-tree" or ask me to send you this. You'll see that the maintaining of a nested-tree is covered by its good profit.