pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Brink <cb@onsitetech.com>
To: pgsql-sql@postgresql.org
Subject: Is this the most efficent way to child nodes off a N-ary node database?
Date: Thu, 14 Feb 2002 10:52:47 -0800
Message-ID: <a4h183$1ud8$1@jupiter.hub.org> (raw)

I have created this SQL statment, used to pull the child/leaf nodes off of a
N-ary node structure in PostgreSQL.

Is my premise all wrong?

Is this efficent as a SQL select?

Should this be done in my code (something I try to avoid for abstraction
reasons)?

 "SELECT DISTINCT t1.node_id FROM node t1 WHERE NOT EXISTS (SELECT
t1.node_id FROM node t2 WHERE t1.node_id = t2.parent_id);"






view thread (2+ messages)  latest in thread

Message-ID: <a4h183$1ud8$1@jupiter.hub.org>
Permalink:  ../a4h183$1ud8$1@jupiter.hub.org/
Also on:    postgresql.org/message-id/a4h183$1ud8$1@jupiter.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cb@onsitetech.com
  Subject: Re: Is this the most efficent way to child nodes off a N-ary node database?
  In-Reply-To: <a4h183$1ud8$1@jupiter.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox