Is this the most efficent way to child nodes off a N-ary node database?

Поиск
Список
Период
Сортировка
От Christian Brink
Тема Is this the most efficent way to child nodes off a N-ary node database?
Дата
Msg-id a4h183$1ud8$1@jupiter.hub.org
обсуждение исходный текст
Ответы Re: Is this the most efficent way to child nodes off a N-ary
Список pgsql-sql
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);"





В списке pgsql-sql по дате отправления: